You are here

function views_handler_filter_group_by_numeric::op_empty in Views (for Drupal 7) 6.3

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

Overrides views_handler_filter_numeric::op_empty

File

handlers/views_handler_filter_group_by_numeric.inc, line 32

Class

views_handler_filter_group_by_numeric
Simple filter to handle greater than/less than filters

Code

function op_empty($field) {
  if ($this->operator == 'empty') {
    $operator = "IS NULL";
  }
  else {
    $operator = "IS NOT NULL";
  }
  $this->query
    ->add_having($this->options['group'], "{$field} {$operator}");
}