Add existing GROUPBYs to count queries

This commit is contained in:
Eric Lippmann 2014-11-13 16:34:27 +01:00 committed by Johannes Meyer
parent 0e34001568
commit 94f8597271
1 changed files with 3 additions and 1 deletions

View File

@ -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);