You are here

function views_handler_sort_group_by_numeric::query in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 7.3 handlers/views_handler_sort_group_by_numeric.inc \views_handler_sort_group_by_numeric::query()

Called to add the field to a query.

Overrides views_handler_sort::query

File

handlers/views_handler_sort_group_by_numeric.inc, line 19

Class

views_handler_sort_group_by_numeric
Handler for GROUP BY on simple numeric fields.

Code

function query() {
  $this
    ->ensure_my_table();
  $params = array(
    'function' => $this->options['group_type'],
  );
  $this->query
    ->add_orderby($this->table_alias, $this->real_field, $this->options['order'], NULL, $params);
}