lilman Posted May 4, 2007 Share Posted May 4, 2007 I am dumbfounded by this error I am getting. It all looks right, so I cannot figure out why it won't execute. Here is the code, and then the error I am getting. $sql = "INSERT INTO pandoris_hotornot_comments (canidate_id, score, hot, not) VALUES ('$user_picture_id', '$score', '$hot', '$not')"; $run = mysql_query($sql) or die("Error ". mysql_error() ." with query ". $sql); Error: Error 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 'not) VALUES ('1', '4', 'hot', 'not')' at line 1 with query INSERT INTO pandoris_hotornot_comments (canidate_id, score, hot, not) VALUES ('1', '4', 'hot', 'not') Link to comment https://forums.phpfreaks.com/topic/50025-error-with-query/ Share on other sites More sharing options...
zzman Posted May 4, 2007 Share Posted May 4, 2007 not is a mysql function. 1st of all you should not use it as a field name. If you do you need to put it in quotes `not`. Link to comment https://forums.phpfreaks.com/topic/50025-error-with-query/#findComment-245579 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.