mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
Use automatically a subquery when counting with groups
This commit is contained in:
parent
77f5bc3932
commit
0e34001568
@ -269,7 +269,7 @@ class DbQuery extends SimpleQuery
|
|||||||
$count = $this->dbSelect();
|
$count = $this->dbSelect();
|
||||||
|
|
||||||
$this->applyFilterSql($count);
|
$this->applyFilterSql($count);
|
||||||
if ($this->useSubqueryCount) {
|
if ($this->useSubqueryCount || $this->group) {
|
||||||
$count->columns($this->columns);
|
$count->columns($this->columns);
|
||||||
$columns = array('cnt' => 'COUNT(*)');
|
$columns = array('cnt' => 'COUNT(*)');
|
||||||
return $this->db->select()->from($count, $columns);
|
return $this->db->select()->from($count, $columns);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user