From 7a061edb66c4450f127df7ddebe6110bf82e2779 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 28 Sep 2017 16:46:40 +0200 Subject: [PATCH] group by id_agent in group events --- pandora_console/include/functions_events.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index b2fd31beee..763f246bdf 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -146,7 +146,7 @@ function events_get_events_grouped($sql_post, $offset = 0, $sql = "SELECT COUNT(*) FROM (SELECT * FROM $table te WHERE 1=1 " . $sql_post . " - GROUP BY estado, evento, id_agentmodule" . $groupby_extra . ") AS t"; + GROUP BY estado, evento, id_agente, id_agentmodule" . $groupby_extra . ") AS t"; } else { $sql = "SELECT *, MAX(id_evento) AS id_evento, @@ -161,7 +161,7 @@ function events_get_events_grouped($sql_post, $offset = 0, (SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp FROM $table te WHERE 1=1 " . $sql_post . " - GROUP BY estado, evento, id_agentmodule" . $groupby_extra . " + GROUP BY estado, evento, id_agente, id_agentmodule" . $groupby_extra . " ORDER BY timestamp_rep " . $order . " LIMIT " . $offset . "," . $pagination; } break;