From 9a4c55a83a7bff5071c9359dacfdf368534bd98d Mon Sep 17 00:00:00 2001 From: Adam Zammit Date: Fri, 16 Sep 2016 09:50:17 +1000 Subject: [PATCH] Fix group by clause --- admin/displayappointments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/displayappointments.php b/admin/displayappointments.php index 4e19f33f..d43eaf00 100644 --- a/admin/displayappointments.php +++ b/admin/displayappointments.php @@ -306,7 +306,7 @@ else { AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1) AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1) AND co.operator_id = '$operator_id' - GROUP BY c.case_id ORDER BY a.start ASC"; + GROUP BY a.appointment_id ORDER BY a.start ASC"; $rs = $db->GetAll($sql); if (!empty($rs)) { translate_array($rs,array("outcome")); @@ -329,7 +329,7 @@ else { AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 ) AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1) AND co.operator_id = '$operator_id' - GROUP BY c.case_id + GROUP BY a.appointment_id ORDER BY a.start ASC"; $rs = $db->GetAll($sql);