MySQL Forums
Forum List  »  Install & Repo

Re: 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 ') VALUES
Posted by: Barry Galbraith
Date: April 01, 2012 05:26PM

As a general rule, you need to test all your queries for errors, and handle any errors.

Build the sql
$sql= "select ... from .... where ... ";
Then echo the sql to see what you have really got!
echo $sql;
Now execute the query, and test for errors
$result = mysql_query($sql) or die(mysql_error());
This will show the error message if the query failed.


So, what constructed sql is giving your failure?

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: 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 ') VALUES
April 01, 2012 05:26PM


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.