<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Building Browsergames: Implementing a flexible stats system (PHP)</title>
	<atom:link href="http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/</link>
	<description>Ever wanted to build a browsergame?</description>
	<lastBuildDate>Wed, 10 Mar 2010 20:26:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Luke</title>
		<link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/comment-page-1/#comment-593</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Thu, 26 Nov 2009 20:15:02 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=25#comment-593</guid>
		<description>Thanks for the tip, Name!</description>
		<content:encoded><![CDATA[<p>Thanks for the tip, Name!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Name</title>
		<link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/comment-page-1/#comment-592</link>
		<dc:creator>Name</dc:creator>
		<pubDate>Thu, 26 Nov 2009 16:11:15 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=25#comment-592</guid>
		<description>Don&#039;t use subqueries, where an inner join is more likely (and probably faster).&lt;br&gt;&lt;br&gt;Change this:&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;SELECT value&lt;br&gt;FROM user_stats&lt;br&gt;WHERE stat_id = (&lt;br&gt;   SELECT id &lt;br&gt;   FROM stats &lt;br&gt;   WHERE display_name = &lt;foo&gt; OR short_name = &lt;foo&gt;)&lt;br&gt;AND user_id = &lt;bar&gt;&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;to this:&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;SELECT user_stats.value&lt;br&gt;FROM user_stats&lt;br&gt;INNER JOIN stats&lt;br&gt;   ON (user_stats.stat_id = stats.id)&lt;br&gt;WHERE stats.display_name = &lt;foo&gt; AND stats.short_name = &lt;foobar&gt; AND user_stats.user_id = &lt;bar&gt;&lt;br&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Don&#39;t use subqueries, where an inner join is more likely (and probably faster).</p>
<p>Change this:</p>
<p><code><br />SELECT value<br />FROM user_stats<br />WHERE stat_id = (<br />   SELECT id <br />   FROM stats <br />   WHERE display_name = &lt;foo&gt; OR short_name = &lt;foo&gt;)<br />AND user_id = &lt;bar&gt;<br /></code></p>
<p>to this:</p>
<p><code><br />SELECT user_stats.value<br />FROM user_stats<br />INNER JOIN stats<br />   ON (user_stats.stat_id = stats.id)<br />WHERE stats.display_name = &lt;foo&gt; AND stats.short_name = &lt;foobar&gt; AND user_stats.user_id = &lt;bar&gt;<br /></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/comment-page-1/#comment-576</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Thu, 26 Nov 2009 14:15:02 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=25#comment-576</guid>
		<description>Thanks for the tip, Name!</description>
		<content:encoded><![CDATA[<p>Thanks for the tip, Name!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Name</title>
		<link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/comment-page-1/#comment-575</link>
		<dc:creator>Name</dc:creator>
		<pubDate>Thu, 26 Nov 2009 10:11:15 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=25#comment-575</guid>
		<description>Don&#039;t use subqueries, where an inner join is more likely (and probably faster).&lt;br&gt;&lt;br&gt;Change this:&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;SELECT value&lt;br&gt;FROM user_stats&lt;br&gt;WHERE stat_id = (&lt;br&gt;   SELECT id &lt;br&gt;   FROM stats &lt;br&gt;   WHERE display_name = &lt;foo&gt; OR short_name = &lt;foo&gt;)&lt;br&gt;AND user_id = &lt;bar&gt;&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;to this:&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;SELECT user_stats.value&lt;br&gt;FROM user_stats&lt;br&gt;INNER JOIN stats&lt;br&gt;   ON (user_stats.stat_id = stats.id)&lt;br&gt;WHERE stats.display_name = &lt;foo&gt; AND stats.short_name = &lt;foobar&gt; AND user_stats.user_id = &lt;bar&gt;&lt;br&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Don&#39;t use subqueries, where an inner join is more likely (and probably faster).</p>
<p>Change this:</p>
<p><code><br />SELECT value<br />FROM user_stats<br />WHERE stat_id = (<br />   SELECT id <br />   FROM stats <br />   WHERE display_name = &lt;foo&gt; OR short_name = &lt;foo&gt;)<br />AND user_id = &lt;bar&gt;<br /></code></p>
<p>to this:</p>
<p><code><br />SELECT user_stats.value<br />FROM user_stats<br />INNER JOIN stats<br />   ON (user_stats.stat_id = stats.id)<br />WHERE stats.display_name = &lt;foo&gt; AND stats.short_name = &lt;foobar&gt; AND user_stats.user_id = &lt;bar&gt;<br /></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/comment-page-1/#comment-496</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Thu, 08 Oct 2009 16:38:33 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=25#comment-496</guid>
		<description>You need to actually put values into the &lt;foo&gt; and &lt;bar&gt; portions - if you read a little further, the code to do that is later on.</description>
		<content:encoded><![CDATA[<p>You need to actually put values into the &lt;foo&gt; and &lt;bar&gt; portions &#8211; if you read a little further, the code to do that is later on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/comment-page-1/#comment-419</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Wed, 10 Jun 2009 19:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=25#comment-419</guid>
		<description>You&#039;re missing the string formatting that puts arguments into your SQL&lt;br&gt;statement - add that, and you should be good to go.</description>
		<content:encoded><![CDATA[<p>You&#39;re missing the string formatting that puts arguments into your SQL<br />statement &#8211; add that, and you should be good to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sHyuAn</title>
		<link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/comment-page-1/#comment-418</link>
		<dc:creator>sHyuAn</dc:creator>
		<pubDate>Wed, 10 Jun 2009 17:26:02 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=25#comment-418</guid>
		<description>&quot;SELECT value FROM user_stats WHERE stat_id = (SELECT id FROM stats WHERE display_name = &lt;foo&gt; OR short_name = &lt;foo&gt;) AND user_id = &lt;bar&gt;&quot;&lt;br&gt;&lt;br&gt;i have inserted this into sql query.. however, the error message came out as below:&lt;br&gt;&lt;br&gt;&quot;MySQL said: &lt;br&gt;&lt;br&gt;#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#039;&lt;foo&gt; OR short_name = &lt;foo&gt;) AND user_id = &lt;bar&gt;&lt;br&gt;LIMIT 0, 30&#039; at line 1&quot;&lt;br&gt;&lt;br&gt;what should I do now?</description>
		<content:encoded><![CDATA[<p>&#8220;SELECT value FROM user_stats WHERE stat_id = (SELECT id FROM stats WHERE display_name = &lt;foo&gt; OR short_name = &lt;foo&gt;) AND user_id = &lt;bar&gt;&#8221;</p>
<p>i have inserted this into sql query.. however, the error message came out as below:</p>
<p>&#8220;MySQL said: </p>
<p>#1064 &#8211; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&lt;foo&gt; OR short_name = &lt;foo&gt;) AND user_id = &lt;bar&gt;<br />LIMIT 0, 30&#39; at line 1&#8243;</p>
<p>what should I do now?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Free Content for your Website</title>
		<link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/comment-page-1/#comment-375</link>
		<dc:creator>Free Content for your Website</dc:creator>
		<pubDate>Mon, 16 Mar 2009 22:49:51 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=25#comment-375</guid>
		<description>Does subqueries work on MySQL 4.x or they were added on MySQL 5.x only?</description>
		<content:encoded><![CDATA[<p>Does subqueries work on MySQL 4.x or they were added on MySQL 5.x only?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
