TP5正式版DB的count这个问题还是在阿,难道我写错了?

浏览:2866 发布日期:2016/09/18 分类:ThinkPHP5专区
比如:
select count(*) as total,id from a group by type order by total desc
如何做分页查询是
执行count是,生成的mysql语句:
select count(*) As tp_count from a group by type order by total desc
这sql语句报错,不应该加上order by

望解决一下~
最佳答案
评论( 相关
后面还有条评论,点击查看>>