function Sql::addGroupBy
Add a simple GROUP BY clause to the query.
The caller is responsible for ensuring that the fields are fully qualified and the table is properly added.
1 call to Sql::addGroupBy()
- Sql::query in core/
modules/ views/ src/ Plugin/ views/ query/ Sql.php - Generates a query and count query from all of the information supplied.
File
-
core/
modules/ views/ src/ Plugin/ views/ query/ Sql.php, line 1104
Class
- Sql
- Views query plugin for an SQL query.
Namespace
Drupal\views\Plugin\views\queryCode
public function addGroupBy($clause) {
// Only add it if it's not already in there.
if (!in_array($clause, $this->groupby)) {
$this->groupby[] = $clause;
}
}