<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://planeshift.top-ix.org//pswiki/index.php?action=history&amp;feed=atom&amp;title=Useful_queries</id>
	<title>Useful queries - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://planeshift.top-ix.org//pswiki/index.php?action=history&amp;feed=atom&amp;title=Useful_queries"/>
	<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Useful_queries&amp;action=history"/>
	<updated>2026-04-06T22:47:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Useful_queries&amp;diff=24546&amp;oldid=prev</id>
		<title>Talad at 20:35, 28 March 2023</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Useful_queries&amp;diff=24546&amp;oldid=prev"/>
		<updated>2023-03-28T20:35:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:35, 28 March 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  select parent_item_id, id,loc_instance ,loc_sector_id from item_instances where loc_instance =0 and parent_item_id in (&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  select parent_item_id, id,loc_instance ,loc_sector_id from item_instances where loc_instance =0 and parent_item_id in (&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  select ii.id from item_instances ii, item_stats s where ii.item_stats_id_standard = s.id and loc_sector_id in (11,73,81,82,204) and s.container_max_slots &amp;gt; 0);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  select ii.id from item_instances ii, item_stats s where ii.item_stats_id_standard = s.id and loc_sector_id in (11,73,81,82,204) and s.container_max_slots &amp;gt; 0);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Invalid sectors ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;With PSunreal we removed a number of sectors, this check verifies if there is anything in those sectors. Result should be zero.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; select * from natural_resources nr where loc_sector_id in (1,2,3,6,20,21,23,24,27,28,29,30,33,34,35,36,37,54,55,56,57,58,62,63,64,65,68,69,70,74,78,79);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; select * from hunt_locations where sector in (1,2,3,6,20,21,23,24,27,28,29,30,33,34,35,36,37,54,55,56,57,58,62,63,64,65,68,69,70,74,78,79);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Useful_queries&amp;diff=24545&amp;oldid=prev</id>
		<title>Talad: Created page with &quot; ===Guildhouse containers=== Extracts all items inside guildhouse containers without a proper loc_instance . This is required by the code to properly load items in guildhouses.  select parent_item_id, id,loc_instance ,loc_sector_id from item_instances where loc_instance =0 and parent_item_id in (  select ii.id from item_instances ii, item_stats s where ii.item_stats_id_standard = s.id and loc_sector_id in (11,73,81,82,204) and s.container_max_slots &gt; 0);&quot;</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Useful_queries&amp;diff=24545&amp;oldid=prev"/>
		<updated>2023-03-28T20:27:46Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; ===Guildhouse containers=== Extracts all items inside guildhouse containers without a proper loc_instance . This is required by the code to properly load items in guildhouses.  select parent_item_id, id,loc_instance ,loc_sector_id from item_instances where loc_instance =0 and parent_item_id in (  select ii.id from item_instances ii, item_stats s where ii.item_stats_id_standard = s.id and loc_sector_id in (11,73,81,82,204) and s.container_max_slots &amp;gt; 0);&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
===Guildhouse containers===&lt;br /&gt;
Extracts all items inside guildhouse containers without a proper loc_instance . This is required by the code to properly load items in guildhouses.&lt;br /&gt;
 select parent_item_id, id,loc_instance ,loc_sector_id from item_instances where loc_instance =0 and parent_item_id in (&lt;br /&gt;
 select ii.id from item_instances ii, item_stats s where ii.item_stats_id_standard = s.id and loc_sector_id in (11,73,81,82,204) and s.container_max_slots &amp;gt; 0);&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
</feed>