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 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. 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. Link to comment https://forums.phpfreaks.com/topic/191453-mysql-query-fails/#findComment-1009609 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.