function pay_handler_filter_amount::query in Pay 6
Same name and namespace in other branches
- 7 includes/views/pay_handler_filter_amount.inc \pay_handler_filter_amount::query()
File
- includes/
views/ pay_handler_filter_amount.inc, line 124
Class
- pay_handler_filter_amount
- Simple filter to handle greater than/less than filters
Code
function query() {
$this
->ensure_my_table();
$field = "{$this->table_alias}.{$this->real_field}";
$sql = "SELECT SUM({$this->real_field}) FROM {pay_transaction} px WHERE px.pfid = {$this->table_alias}.pfid";
$field_alias = $this->query
->add_field('', "({$sql})", $this->real_field . '_total_paid');
$this->field_alias = $field = $field_alias;
$info = $this
->operators();
if (!empty($info[$this->operator]['method'])) {
$this
->{$info[$this->operator]['method']}($field);
}
}