ericwright17 Posted February 9, 2010 Share Posted February 9, 2010 when i run the following: mysql_query("INSERT INTO hours (name, project, dates, isp, nhs, other, desc) VALUES ('a', 'a', 'a', 'a', 'a', 'a', 'a') ") or die(mysql_error()); why do i get this 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 'desc) VALUES ('a', 'a', 'a', 'a', 'a', 'a', 'a')' at line 1 Quote Link to comment https://forums.phpfreaks.com/topic/191453-mysql-query-fails/ Share on other sites More sharing options...
trq Posted February 9, 2010 Share Posted February 9, 2010 desc is a reserved word. Quote Link to comment https://forums.phpfreaks.com/topic/191453-mysql-query-fails/#findComment-1009282 Share on other sites More sharing options...
hamza Posted February 9, 2010 Share Posted February 9, 2010 yeah desc is a reserv word try to change it ...descr or description. Quote Link to comment https://forums.phpfreaks.com/topic/191453-mysql-query-fails/#findComment-1009609 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.