FIX: Add missing 'groupby' and remove redundant conditional in 'having'

This commit is contained in:
Tom Densham 2013-05-29 16:58:32 +02:00 committed by root
parent bd918915e2
commit 3290511141

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;
}