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. Quote 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 Quote 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. Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/206004-mysql-syntax-error/#findComment-1077953 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.