m2babaey Posted July 20, 2007 Share Posted July 20, 2007 Hi. This code prompts an error. How can I fix it? it's urgent mysql_query("INSERT INTO details ( date, time, where ,who, price, action ,comments ) VALUES('$date','$time','$where','$who','$price' ,'$action' ,'$comments' )") or die(mysql_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 'where ,who, price, action ,comments ) VALUES('07/14/2007','0940 Quote Link to comment https://forums.phpfreaks.com/topic/60900-mysql-error-help/ Share on other sites More sharing options...
clearstatcache Posted July 20, 2007 Share Posted July 20, 2007 try to change ur field name where ..... i guess where is a reserve word in mysql or sumtng lyk dat.... Quote Link to comment https://forums.phpfreaks.com/topic/60900-mysql-error-help/#findComment-303045 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.