<div>Assuming MySQL, I found the fix for this was to go the Advanced tab for the ZSQL Method (in the ZMI) and set &quot;Maximum Rows to Retrieve&quot; to zero.</div>
<div>&nbsp;</div>
<div>After that, my limit clause worked without a problem.</div><br><br>
<div><span class="gmail_quote">On 5/11/05, <b class="gmail_sendername">Asad Habib</b> &lt;<a href="mailto:ahabib@engin.umich.edu">ahabib@engin.umich.edu</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Is there a reason why Z SQL methods do not allow the use of the LIMIT<br>clause? I am absolutely certain that my query has the right syntax since I
<br>executed it against the MySQL server and it gave me the correct results.<br>FYI, I have provided the query below:<br><br>SELECT course_id FROM course<br>WHERE course_id &lt; 991000<br>ORDER BY course_id DESC LIMIT 1<br>
<br>Furthermore, Zope throws the following error when I try to test this query<br>via the ZMI and also when I use it in my application:<br><br>(1064, &quot;You have an error in your SQL syntax; check the manual that<br>corresponds to your MySQL server version for the right syntax to use near
<br>'LIMIT 1000' at line 3&quot;)<br><br>Any help would be appreciated. Thank you.<br><br>- Asad<br>_______________________________________________<br>Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org">Zope@zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>(Related lists -<br><a href="http://mail.zope.org/mailman/listinfo/zope-announce">
http://mail.zope.org/mailman/listinfo/zope-announce</a><br><a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></blockquote></div><br>