From 8bbe4b6274745f9ae1d8f24c2d94df6af719f4e3 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Thu, 1 Aug 2024 10:18:33 +0300 Subject: [PATCH] Fixes SQL --- public_html/classes/queries.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public_html/classes/queries.php b/public_html/classes/queries.php index 6d71180..05a0983 100644 --- a/public_html/classes/queries.php +++ b/public_html/classes/queries.php @@ -203,14 +203,14 @@ ORDER BY // number of participants for time period (if given) 'participant_number' => " -SELECT COUNT(p.endpoint_id) as participants +SELECT COUNT(DISTINCT p.endpoint_id) as participants FROM participants p LEFT JOIN participant_events pe ON p.endpoint_id = pe.participant_id WHERE (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59') -AND pe.event_type = 'pair selected'", +AND pe.event_type = 'participant joining'", // list all participants