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 by createtime desc' at line 1
sql 语句有错
检查sql语句和 限制条件的顺序
按顺序书写
-- "mysql语句编写顺序"
1 select distinct *
2 from 表(或结果集)
3 where …
4 group by …having…
5 order by …
6 limit start,count
-- 注:1、2属于最基本语句,必须含有。
-- 注:1、2可以与3、4、5、6中任一搭配,也可以与3、4、5、6中多个同时搭配。