SQLSTATE[42000]

SQLSTATE[42000]: Syntax error or access violation: 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause (SQL: select count(*) as aggregate from `marketing_goods_exchange_log` order by `status` asc, `updated_at` desc)

count()方法统计数量时候,如果排序,报错42000

解决方法:去掉排序。

posted @ 2018-03-30 11:20  万里冰封  阅读(1445)  评论(0编辑  收藏  举报