kyles0623 Posted June 27, 2010 Share Posted June 27, 2010 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 'order' at line 1 I only get this error when I order by an int variable called order taken from the table. $sql = "SELECT * FROM cms_content ORDER BY order"; I can order it by other things but not that. Link to comment https://forums.phpfreaks.com/topic/206004-mysql-syntax-error/ Share on other sites More sharing options...
Mchl Posted June 27, 2010 Share Posted June 27, 2010 http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html Link to comment https://forums.phpfreaks.com/topic/206004-mysql-syntax-error/#findComment-1077943 Share on other sites More sharing options...
kyles0623 Posted June 27, 2010 Author Share Posted June 27, 2010 oh......well don't I feel stupid....Thankyou very much. Link to comment https://forums.phpfreaks.com/topic/206004-mysql-syntax-error/#findComment-1077951 Share on other sites More sharing options...
Mchl Posted June 27, 2010 Share Posted June 27, 2010 Don't worry. Half of my post count is from pasting this link Link to comment https://forums.phpfreaks.com/topic/206004-mysql-syntax-error/#findComment-1077953 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.