From a6393ae909224a12c01077e1cb6dfe5877ee7fbc Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Thu, 14 Nov 2019 12:18:01 +0100 Subject: [PATCH] Fixed sql query in model/stat/chart.php #1024 Signed-off-by: Janos SUTO --- webui/model/stat/chart.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webui/model/stat/chart.php b/webui/model/stat/chart.php index b788a685..8cb8a3b5 100644 --- a/webui/model/stat/chart.php +++ b/webui/model/stat/chart.php @@ -43,9 +43,9 @@ class ModelStatChart extends Model { if($q) { $q .= ",?"; } else { $q = "?"; } } reset($auditdomains); - $query = $this->db->query("select ANY_VALUE(arrived-(arrived%$delta)) as ts, count(*) as num from " . VIEW_MESSAGES . " where arrived > $range AND todomain IN ($q) $domains $grouping ORDER BY ts DESC limit $limit", $auditdomains); + $query = $this->db->query("select (arrived-(arrived%$delta)) as ts, count(*) as num from " . VIEW_MESSAGES . " where arrived > $range AND todomain IN ($q) $domains $grouping ORDER BY ts DESC limit $limit", $auditdomains); } else { - $query = $this->db->query("select ANY_VALUE(arrived-(arrived%$delta)) as ts, count(*) as num from " . TABLE_META . " where arrived > $range $grouping ORDER BY ts DESC limit $limit"); + $query = $this->db->query("select (arrived-(arrived%$delta)) as ts, count(*) as num from " . TABLE_META . " where arrived > $range $grouping ORDER BY ts DESC limit $limit"); }