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