laravel 不能groupBy

2019-07-13  本文已影响0人  xiaoer0128

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'matter.matter_matters.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (SQL: select * from matter_matters where status = 1 and is_top = 1 group by uid)

打开laravel 数据库的配置
strict=false
即可

上一篇下一篇

猜你喜欢

热点阅读