leequalls Posted December 17, 2010 Share Posted December 17, 2010 Im not quite sure what is wrong here: $query = "INSERT INTO careers (date, title, article2, order) VALUES('$date','$title','$article','$order')"; mysql_query($query) 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 'order) VALUES('17 Dec 2010','Promotions Director','Station Summary:','1')' at line 1 Link to comment https://forums.phpfreaks.com/topic/221997-error-in-your-sql-syntax/ Share on other sites More sharing options...
Pikachu2000 Posted December 17, 2010 Share Posted December 17, 2010 Order is a MySQL reserved word. Enclose it in `backticks` when using it in your query string to reference a table or field name. Link to comment https://forums.phpfreaks.com/topic/221997-error-in-your-sql-syntax/#findComment-1148728 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.