function Sql::add_groupby in Views (for Drupal 7) 8.3
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::add_groupby()
- Sql::query in lib/
Drupal/ views/ Plugin/ views/ query/ Sql.php - Generate a query and a countquery from all of the information supplied to the object.
File
- lib/
Drupal/ views/ Plugin/ views/ query/ Sql.php, line 1034 - Definition of Drupal\views\Plugin\views\query\Sql.
Class
- Sql
- @todo.
Namespace
Drupal\views\Plugin\views\queryCode
function add_groupby($clause) {
// Only add it if it's not already in there.
if (!in_array($clause, $this->groupby)) {
$this->groupby[] = $clause;
}
}