0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Laravel をherokuにデプロイして、Group byしたらMySqlから「isn't in GROUP BY」って怒られた話

Last updated at Posted at 2021-12-30

事象

apiのクエリ実行で以下のエラーが発生した。

message: "SQLSTATE[42000]: Syntax error or access violation: 1055
 '<database name>' isn't in GROUP BY 

原因

config/database.phpで設定されている、「strict = true」。

解決内容

config/database.phpの 'mysql' 内にある、'strict' => true,'strict' => false, に変更でMysqlに怒られなくなった。

参考URL

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?