function pay_handler_filter_amount::op_between in Pay 6
Same name and namespace in other branches
- 7 includes/views/pay_handler_filter_amount.inc \pay_handler_filter_amount::op_between()
File
- includes/
views/ pay_handler_filter_amount.inc, line 147
Class
- pay_handler_filter_amount
- Simple filter to handle greater than/less than filters
Code
function op_between($field) {
if ($this->operator == 'between') {
$this->query
->add_having($this->options['group'], "{$field} >= %d", $this->value['min']);
$this->query
->add_having($this->options['group'], "{$field} <= %d", $this->value['max']);
}
else {
$this->query
->add_having($this->options['group'], "{$field} <= %d OR {$field} >= %d", $this->value['min'], $this->value['max']);
}
}