function views_plugin_query_default::add_groupby in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 7.3 plugins/views_plugin_query_default.inc \views_plugin_query_default::add_groupby()
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 views_plugin_query_default::add_groupby()
- views_plugin_query_default::query in plugins/
views_plugin_query_default.inc - Generate a query and a countquery from all of the information supplied to the object.
File
- plugins/
views_plugin_query_default.inc, line 888 - views_plugin_query_default.inc Defines the default query object which builds SQL to execute using the Drupal database API.
Class
- views_plugin_query_default
- 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;
}
}