Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Fix query with compat MySQL 5.7. references #1807
Browse files Browse the repository at this point in the history
  • Loading branch information
David Durieux committed May 17, 2016
1 parent 38bf98a commit e115e05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit e115e05

Please sign in to comment.