mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: Add missing 'groupby' and remove redundant conditional in 'having'
This commit is contained in:
parent
bd918915e2
commit
3290511141
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user