function views_plugin_query_default::add_groupby

Same name in other branches
  1. 7.x-3.x 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

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;
    }
}