开发者

MySQL: ERROR 1064 (42000) - Why is ORDER BY failing?

开发者 https://www.devze.com 2023-01-13 17:02 出处:网络
as a limit 0,50 ORDER BY SortOrder, paid desc, ae desc, name asc, title asc ERROR 1064 (42000): You have a开发者_如何学Gon error in your SQL syntax; check the manual that corresponds to your MySQ
as a 
limit 0,50 
ORDER BY SortOrder, paid desc, ae desc, name asc, title asc

ERROR 1064 (42000): You have a开发者_如何学Gon error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY SortOrder, paid desc, ae desc, name asc, titile asc' at line 48


You have to change the order of the parts of your query. Change it to

as a ORDER BY SortOrder, paid desc, ae desc, name asc, title asc limit 0,50


As far as I know, LIMIT needs to be at the end of the statement.

0

精彩评论

暂无评论...
验证码 换一张
取 消