From f0f32e82a5282714a22e7154c5d9d1c3bb5c4bf2 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 7 Jan 2018 17:49:55 +0100 Subject: [PATCH] Convert all client host names to lower case when requesting api_db.php?topClients Signed-off-by: DL6ER --- api_db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api_db.php b/api_db.php index 2263bade..161f8d87 100644 --- a/api_db.php +++ b/api_db.php @@ -94,7 +94,7 @@ if (isset($_GET['topClients']) && $auth) { $limit = "WHERE timestamp <= ".$_GET["until"]; } - $results = $db->query('SELECT client,count(client) FROM queries '.$limit.' GROUP by client order by count(client) desc limit 10'); + $results = $db->query('SELECT LOWER(client),count(LOWER(client)) FROM queries '.$limit.' GROUP by LOWER(client) order by count(LOWER(client)) desc limit 10'); $clients = array();