Skip to content

Commit

Permalink
FIX: Add missing 'groupby' and remove redundant conditional in 'having'
Browse files Browse the repository at this point in the history
  • Loading branch information
nedmas authored and root committed May 29, 2013
1 parent bd91891 commit 3290511
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions model/DataQuery.php
Expand Up @@ -418,15 +418,23 @@ protected function selectColumnsFromTable(SQLQuery &$query, $tableClass, $column
}
}

/**
* Set the GROUP BY clause of this query.
*
* @param String $groupby Escaped SQL statement
*/
public function groupby($groupby) {
$this->query->addGroupBy($groupby);
return $this;
}

/**
* Set the HAVING clause of this query.
*
* @param String $having Escaped SQL statement
*/
public function having($having) {
if($having) {
$this->query->addHaving($having);
}
$this->query->addHaving($having);
return $this;
}

Expand Down

0 comments on commit 3290511

Please sign in to comment.