laravel 5.3 GROUP BY 问题

来源:互联网 发布:ps相片软件下载 编辑:程序博客网 时间:2024/06/05 21:10

问题:

SQLSTATE[42000]: Syntax error or access violation: 1055 'demo.archives.id' isn't in GROUP BY (SQL: select `id`, `author`, count(*) as total from `archives` where `created_at` >= 2016-10-18 and `created_at` < 2016-10-19 group by `author`


解决:
编辑’config/database.php’:
'strict' => false,


原文链接

原创粉丝点击