You are here

function fraction_handler_filter_decimal::op_between in Fraction 7

Overrides views_handler_filter_numeric::op_between

File

views/handlers/fraction_handler_filter_decimal.inc, line 33
Contains the Fraction Views filter handler.

Class

fraction_handler_filter_decimal
Filter handler for Fraction fields.

Code

function op_between($field) {
  if ($this->operator == 'between') {
    $expression = $field . ' BETWEEN :min AND :max';
    $this->query
      ->add_where_expression($this->options['group'], $expression, array(
      ':min' => $this->value['min'],
      ':max' => $this->value['max'],
    ));
  }
  else {
    $expression = $field . ' <= :min OR ' . $field . ' >= :max';
    $this->query
      ->add_where_expression($this->options['group'], $expression, array(
      ':min' => $this->value['min'],
      ':max' => $this->value['max'],
    ));
  }
}