From 7cea3c9d91a7d74d1fd82d10d67add54f676c838 Mon Sep 17 00:00:00 2001 From: Fordnox Date: Sun, 1 Nov 2020 13:54:55 +0200 Subject: [PATCH] Fix SELECT list is not in GROUP BY clause and contains nonaggregated column incompatible with sql_mode=only_full_group_by --- src/bb-di.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bb-di.php b/src/bb-di.php index 2f346131f..138f0235b 100644 --- a/src/bb-di.php +++ b/src/bb-di.php @@ -72,6 +72,7 @@ $di['pdo'] = function() use ($di) { $pdo->exec( 'SET character_set_server = utf8' ); $pdo->exec( 'SET SESSION interactive_timeout = 28800' ); $pdo->exec( 'SET SESSION wait_timeout = 28800' ); + $pdo->exec( 'SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,"ONLY_FULL_GROUP_BY",""));' ); } return $pdo;