mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 18:10:11 +01:00
Fixed sql query in model/stat/chart.php #1024
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
111bcce6e0
commit
a6393ae909
@ -43,9 +43,9 @@ class ModelStatChart extends Model {
|
|||||||
if($q) { $q .= ",?"; } else { $q = "?"; }
|
if($q) { $q .= ",?"; } else { $q = "?"; }
|
||||||
}
|
}
|
||||||
reset($auditdomains);
|
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 {
|
} 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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user