List:General Discussion« Previous MessageNext Message »
From:David Legault Date:June 10 2005 5:41pm
Subject:LIMIT error
View as plain text  

I'm using the MySQL C API and I got the following error for this query:

UPDATE tracks SET track_state='-2', track_cost='1.500000' WHERE 
track_flynum='10' AND track_testcase='45' ORDER BY track_step DESC LIMIT 0,1

SQL Error 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 '1' at line 1

If I put LIMIT 1 instead of LIMIT 0,1 I get the correct result.

This seems to be a weird problem and according to the documentation, 
should be equivalent, but it seems not.

Running on Win2k, MySQL 4.1.11, mysqld-nt.exe


LIMIT errorDavid Legault10 Jun
  • Re: LIMIT errorKristen G. Thorson10 Jun
  • Re: LIMIT errorGleb Paharenko11 Jun