Add existing GROUPBYs to count queries
This commit is contained in:
parent
0e34001568
commit
94f8597271
|
@ -267,7 +267,9 @@ class DbQuery extends SimpleQuery
|
|||
{
|
||||
// TODO: there may be situations where we should clone the "select"
|
||||
$count = $this->dbSelect();
|
||||
|
||||
if ($this->group) {
|
||||
$count->group($this->group);
|
||||
}
|
||||
$this->applyFilterSql($count);
|
||||
if ($this->useSubqueryCount || $this->group) {
|
||||
$count->columns($this->columns);
|
||||
|
|
Loading…
Reference in New Issue