php

使用mysql group by 报错

2019-08-17  本文已影响0人  左木北鱼

问题:通过 GROUP BY 查询时抛出下列异常

SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #19 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.s.download_add' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

解决方法:

sudo vim /etc/my.cnf
上一篇 下一篇

猜你喜欢

热点阅读