Merge pull request #2029 from nedmas/patch-2

FIX: Add missing 'groupby' method
This commit is contained in:
Ingo Schommer 2013-05-29 14:30:04 -07:00
commit 1ffbbb5377

View File

@ -418,15 +418,23 @@ class DataQuery {
}
}
/**
* 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;
}