From e115e0598b23529700708904348bbe86fcf9ec97 Mon Sep 17 00:00:00 2001 From: David Durieux Date: Tue, 17 May 2016 14:50:53 +0200 Subject: [PATCH] Fix query with compat MySQL 5.7. references #1807 --- install/update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/update.php b/install/update.php index 60a31cf9ee..5ecdd5f26c 100644 --- a/install/update.php +++ b/install/update.php @@ -5840,7 +5840,7 @@ function changeDisplayPreference($olditemtype, $newitemtype) { $query = "SELECT *, count(`id`) as `cnt` FROM `glpi_displaypreferences` WHERE (`itemtype` = '".$newitemtype."' OR `itemtype` = '".$olditemtype."') - group by `users_id`, `num`"; + group by `users_id`, `num`, `id`"; $result=$DB->query($query); while ($data=$DB->fetch_array($result)) { if ($data['cnt'] > 1) { @@ -7669,7 +7669,7 @@ function pluginFusioninventorychangeDisplayPreference($olditemtype, $newitemtype $query = "SELECT *, count(`id`) as `cnt` FROM `glpi_displaypreferences` WHERE (`itemtype` = '".$newitemtype."' OR `itemtype` = '".$olditemtype."') - group by `users_id`, `num`"; + group by `users_id`, `num`, `id`"; $result=$DB->query($query); while ($data=$DB->fetch_array($result)) { if ($data['cnt'] > 1) {