<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Database Query Failed: right syntax to use near 'LIMIT 1'</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/database-query-failed-right-syntax-to-use-near-limit-1</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/database-query-failed-right-syntax-to-use-near-limit-1/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>potain1 on Database Query Failed: right syntax to use near 'LIMIT 1'</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/database-query-failed-right-syntax-to-use-near-limit-1#p7565</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/database-query-failed-right-syntax-to-use-near-limit-1#p7565</guid>
        	        	<description><![CDATA[<p>Hi</p>
<p>I too am having a similar problem with example.php usind PHP and MySQL - followed the instructions in the demo. The error message is exactly the same as ivanhalen&#39;s but<strong></strong> refers to line 42:</p>
<p>// calculate the total pages for the query <br />if( $count &#62; 0 ) { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <em><strong>$total_pages = ceil($count/$limit); </strong></em><br />} else { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $total_pages = 0; <br />}</p>
<p>Any help would be greatly apprecaited. (Using XAMPP on XP Home)</p>
<p>Thanks you</p>
]]></description>
        	        	<pubDate>Tue, 30 Jun 2009 21:32:07 +0300</pubDate>
        </item>
        <item>
        	<title>ivanhalen on Database Query Failed: right syntax to use near 'LIMIT 1'</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/database-query-failed-right-syntax-to-use-near-limit-1#p7488</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/database-query-failed-right-syntax-to-use-near-limit-1#p7488</guid>
        	        	<description><![CDATA[<p>I had the same problem (maybe you notice that it happens only with JSON data)</p>
<p>Here&#39;s what I&#39;ve done:</p>
<ol>
<li>Opening directly in the browser the "example.php" page gave me the same error with a couple of warning about "undefined index": something like:
<p><strong>Notice</strong>:  Undefined index:  sord in <strong>D:\\Web\\php\\demo\\example.php</strong> on line <strong>27</strong></p>
<p> <strong>Warning</strong>:  Division by zero in <strong>D:\\Web\\php\\demo\\example.php</strong> on line <strong>45</strong><br /> Couldn t execute query.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;&#39; at line 1</p>
</li>
<li>I added a querystring to see if the file was working (the page needs some input data to initialize it):<br /><a href="http://path_to_file/example.php?page=1&#038;rows=10" rel="nofollow" target="_blank"><a href="http://path_to_file/example.ph" rel="nofollow">http://path_to_file/example.ph</a>.....38;rows=10</a><br />well, the JSON data was there, at the bottom of the page, but still had the "undefined index" notifications: then I started thinking that these notifications could be bad for the "example.html" page to read JSON data...</li>
<li>I suppressed all the warning and notifications adding the line:<br /><strong>ini_set(&#39;display_errors&#39;, 0);</strong><br />at the top of the example.php page: it works!!!</li>
</ol>
<p>So, for me the key was to use the script as in a production environment, without warning and displaying errors: hope it can help!</p>
]]></description>
        	        	<pubDate>Sat, 27 Jun 2009 08:08:18 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Database Query Failed: right syntax to use near 'LIMIT 1'</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/database-query-failed-right-syntax-to-use-near-limit-1#p6882</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/database-query-failed-right-syntax-to-use-near-limit-1#p6882</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Maybe you set the rowNum parameter in your script to zero.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 25 May 2009 03:17:13 +0300</pubDate>
        </item>
        <item>
        	<title>ivanichi on Database Query Failed: right syntax to use near 'LIMIT 1'</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/database-query-failed-right-syntax-to-use-near-limit-1#p6855</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/database-query-failed-right-syntax-to-use-near-limit-1#p6855</guid>
        	        	<description><![CDATA[<p>I&#39;ve try jqgrid_demo.zip</p>
<p>I have problem, look this script : </p>
<p> 20 // rowNum parameter in the grid <br /> 21 $limit = $_REQUEST[&#39;rows&#39;]; </p>
<p> and then </p>
<p> 42  // calculation of total pages for the query <br /> 43  if( $count &#62;0 ) { <br /> 44      $total_pages = ceil($count/$limit); <br /> 45  } else { <br /> 46  $total_pages = 0; <br /> }</p>
<p><strong>information on browser :</strong></p>
<p><span style="text-decoration: underline;">Warning: Division by zero in C:\\AppServ\\www\\ok\\example.php on line 44 </span></p>
<p> Couldn&#39;t execute query.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;&#39; at line 1 </p>
<p> anybody help me ???  </p>
<p> (Utilising Appserv 10 : PHP/5.2.6 Server)</p>
]]></description>
        	        	<pubDate>Sat, 23 May 2009 20:02:48 +0300</pubDate>
        </item>
</channel>
</rss>