MySQL Forums
Forum List  »  PHP

Re: 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 '10' at line 1
Posted by: Barry Galbraith
Date: September 20, 2011 08:03PM

echo the $sql to see exactly what statement you produce, then try that in commandline client.

$sql="select * from bkc_table order by date desc limit $from,10"; 
echo $sql;  // print the sql to screen for de-bugging
$result=mysql_query($sql,$link);

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: 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 '10' at line 1
September 20, 2011 08:03PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.