More mysql syntax error?
Posted: Mon Nov 10, 2008 3:50 pm
Hello, again php technorati,
This time I keep getting this error:
Query failed: 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 'WHERE 'userID' = 32' at line 1
What is wrong with this Statement?
Here is the code:
I have tried different variations.
Can someone enlighten me?
Thanks in advance ,
Batoe
Query failed: 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 'WHERE 'userID' = 32' at line 1
What is wrong with this Statement?
Here is the code:
Code: Select all
$query ="INSERT INTO `js_profile` (candidateID) VALUES ('$candidateID') WHERE 'userID' = $userID";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$query = "INSERT INTO `js_account` (candidateID) VALUES ('$candidateID') WHERE 'userID' = $userID";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());Can someone enlighten me?
Thanks in advance ,
Batoe