function views_query::add_groupby
2.x query.inc | views_query::add_groupby($clause) |
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.
2 calls to views_query::add_groupby()
- views_query::add_orderby in includes/
query.inc - Add an ORDER BY clause to the query.
- views_query::query in includes/
query.inc - Generate a query and a countquery from all of the information supplied to the object.
File
- includes/
query.inc, line 851 - query.inc Defines the query object which is the underlying layer in a View.
Class
- views_query
- Object used to create a SELECT query.
Code
function add_groupby($clause) {
// Only add it if it's not already in there.
if (!in_array($clause, $this->groupby)) {
$this->groupby[] = $clause;
}
}