You are here

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

Called to add the field to a query.

Overrides views_handler_field::query

File

handlers/views_handler_field_group_by_numeric.inc, line 18

Class

views_handler_field_group_by_numeric
Handler for GROUP BY on simple numeric fields.

Code

function query() {
  $this
    ->ensure_my_table();

  // Add the field, taking care of any aggregation that may affect it.
  $params = array(
    'function' => $this->options['group_type'],
  );
  $this->field_alias = $this->query
    ->add_field($this->table_alias, $this->real_field, NULL, $params);
  $this
    ->add_additional_fields();
}