<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Building Browsergames - Latest Comments in Building Browsergames: Implementing a flexible stats system (PHP)</title><link>http://bbgames.disqus.com/</link><description></description><atom:link href="https://bbgames.disqus.com/building_browsergames_implementing_a_flexible_stats_system_php/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 24 Nov 2013 12:20:35 -0000</lastBuildDate><item><title>Re: Building Browsergames: Implementing a flexible stats system (PHP)</title><link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/#comment-1137277358</link><description>&lt;p&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 '&amp;lt;foo&amp;gt; OR short_name = &amp;lt;foo&amp;gt;) AND user_id = &amp;lt;bar&amp;gt; LIMIT 0, 30' at line 1&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rado</dc:creator><pubDate>Sun, 24 Nov 2013 12:20:35 -0000</pubDate></item><item><title>Re: Building Browsergames: Implementing a flexible stats system (PHP)</title><link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/#comment-898361111</link><description>&lt;p&gt;Le code SELECT value FROM user_stats WHERE stat_id = &amp;lt;foo&amp;gt; AND user_id = &amp;lt;bar&amp;gt;&lt;/p&gt;&lt;p&gt;Ne marche plus Il me mette&lt;/p&gt;&lt;p&gt;Error&lt;/p&gt;&lt;p&gt;There seems to be an error in your SQL query. The MySQL server error &lt;br&gt;output below, if there is any, may also help you in diagnosing the &lt;br&gt;problem&lt;/p&gt;&lt;p&gt;ERROR: Unknown Punctuation String @ 189&lt;br&gt;STR:  AND stats.short_name = &amp;lt;foobar&amp;gt; AND user_stats.user_id = &amp;lt;bar&amp;gt; &amp;lt;/bar&amp;gt;&amp;lt;/foobar&amp;gt;&amp;lt;/foo&amp;gt;&lt;/p&gt;&lt;p&gt;SQL query:&lt;/p&gt;&lt;p&gt;        SELECT user_stats.value FROM user_stats INNER JOIN stats ON &lt;br&gt;(user_stats.stat_id = &lt;a href="http://stats.id" rel="nofollow noopener" target="_blank" title="stats.id"&gt;stats.id&lt;/a&gt;) WHERE stats.display_name = &amp;lt;foo&amp;gt; &lt;br&gt;AND stats.short_name = &amp;lt;foobar&amp;gt; AND user_stats.user_id = &lt;br&gt;&amp;lt;bar&amp;gt; &amp;lt;/bar&amp;gt;&amp;lt;/foobar&amp;gt;&amp;lt;/foo&amp;gt;&lt;/p&gt;&lt;p&gt;    MySQL said:&lt;/p&gt;&lt;p&gt;#1064 - You have an error in your SQL syntax; check the manual that &lt;br&gt;corresponds to your MySQL server version for the right syntax to use &lt;br&gt;near '&amp;lt;foo&amp;gt; AND stats.short_name = &amp;lt;foobar&amp;gt; AND &lt;br&gt;user_stats.user_id = &amp;lt;bar&amp;gt; &amp;lt;/bar&amp;gt;&amp;lt;/foo'&amp;gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sun</dc:creator><pubDate>Wed, 15 May 2013 14:31:44 -0000</pubDate></item><item><title>Re: Building Browsergames: Implementing a flexible stats system (PHP)</title><link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/#comment-145457491</link><description>&lt;p&gt;In what file does this code actually go? Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">disqus_Xx2ZV5yudQ</dc:creator><pubDate>Sat, 12 Feb 2011 18:10:31 -0000</pubDate></item><item><title>Re: Building Browsergames: Implementing a flexible stats system (PHP)</title><link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/#comment-24130084</link><description>&lt;p&gt;Thanks for the tip, Name!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Luke</dc:creator><pubDate>Thu, 26 Nov 2009 10:15:02 -0000</pubDate></item><item><title>Re: Building Browsergames: Implementing a flexible stats system (PHP)</title><link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/#comment-24123749</link><description>&lt;p&gt;Don't use subqueries, where an inner join is more likely (and probably faster).&lt;/p&gt;&lt;p&gt;Change this:&lt;/p&gt;&lt;p&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 = &amp;lt;foo&amp;gt; OR short_name = &amp;lt;foo&amp;gt;)&lt;br&gt;AND user_id = &amp;lt;bar&amp;gt;&lt;br&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;to this:&lt;/p&gt;&lt;p&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 = &amp;lt;foo&amp;gt; AND stats.short_name = &amp;lt;foobar&amp;gt; AND user_stats.user_id = &amp;lt;bar&amp;gt;&lt;br&gt;&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Name</dc:creator><pubDate>Thu, 26 Nov 2009 06:11:15 -0000</pubDate></item><item><title>Re: Building Browsergames: Implementing a flexible stats system (PHP)</title><link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/#comment-19559624</link><description>&lt;p&gt;You need to actually put values into the &amp;lt;foo&amp;gt; and &amp;lt;bar&amp;gt; portions - if you read a little further, the code to do that is later on.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Luke</dc:creator><pubDate>Thu, 08 Oct 2009 12:38:33 -0000</pubDate></item><item><title>Re: Building Browsergames: Implementing a flexible stats system (PHP)</title><link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/#comment-10709041</link><description>&lt;p&gt;You're missing the string formatting that puts arguments into your SQL&lt;br&gt;statement - add that, and you should be good to go.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Luke</dc:creator><pubDate>Wed, 10 Jun 2009 15:06:16 -0000</pubDate></item><item><title>Re: Building Browsergames: Implementing a flexible stats system (PHP)</title><link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/#comment-10704845</link><description>&lt;p&gt;"SELECT value FROM user_stats WHERE stat_id = (SELECT id FROM stats WHERE display_name = &amp;lt;foo&amp;gt; OR short_name = &amp;lt;foo&amp;gt;) AND user_id = &amp;lt;bar&amp;gt;"&lt;/p&gt;&lt;p&gt;i have inserted this into sql query.. however, the error message came out as below:&lt;/p&gt;&lt;p&gt;"MySQL said:&lt;/p&gt;&lt;p&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 '&amp;lt;foo&amp;gt; OR short_name = &amp;lt;foo&amp;gt;) AND user_id = &amp;lt;bar&amp;gt;&lt;br&gt;LIMIT 0, 30' at line 1"&lt;/p&gt;&lt;p&gt;what should I do now?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sHyuAn</dc:creator><pubDate>Wed, 10 Jun 2009 13:26:02 -0000</pubDate></item><item><title>Re: Building Browsergames: Implementing a flexible stats system (PHP)</title><link>http://buildingbrowsergames.com/2008/05/06/building-browsergames-implementing-a-flexible-stats-system-php/#comment-10704193</link><description>&lt;p&gt;"SELECT value FROM user_stats WHERE stat_id = (SELECT id FROM stats WHERE display_name = &amp;lt;foo&amp;gt; OR short_name = &amp;lt;foo&amp;gt;) AND user_id = &amp;lt;bar&amp;gt;"&lt;/p&gt;&lt;p&gt;when i put this into sql query, it shows me the error message as below:&lt;/p&gt;&lt;p&gt;"MySQL said:&lt;/p&gt;&lt;p&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 '&amp;lt;foo&amp;gt; OR short_name = &amp;lt;foo&amp;gt;) AND user_id = &amp;lt;bar&amp;gt;&lt;br&gt;LIMIT 0, 30' at line 1"&lt;/p&gt;&lt;p&gt;what should i do?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sHyuAn</dc:creator><pubDate>Wed, 10 Jun 2009 13:13:11 -0000</pubDate></item></channel></rss>