From 068a6102e5d74893d70519d1f3f7a6c6e1b205d4 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 22 Oct 2020 15:31:11 +0200 Subject: [statistics_reporting] Add missing group statement --- modules-available/statistics_reporting/inc/queries.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules-available/statistics_reporting/inc/queries.inc.php b/modules-available/statistics_reporting/inc/queries.inc.php index f389cfb1..47a07375 100644 --- a/modules-available/statistics_reporting/inc/queries.inc.php +++ b/modules-available/statistics_reporting/inc/queries.inc.php @@ -373,7 +373,8 @@ class Queries $return = []; $eres = Database::simpleQuery("SELECT starttime, endtime, GROUP_CONCAT(exl.locationid) AS `locs` FROM exams LEFT JOIN exams_x_location exl USING (examid) - WHERE starttime < $to AND endtime > $from"); + WHERE starttime < $to AND endtime > $from + GROUP BY examid"); while ($row = $eres->fetch(PDO::FETCH_ASSOC)) { // Get all boot events $data = ['from' => $row['starttime'], 'to' => $row['endtime']]; -- cgit v1.2.3-55-g7522