function views_handler_argument_formula::query

Same name in other branches
  1. 6.x-3.x handlers/views_handler_argument_formula.inc \views_handler_argument_formula::query()

Build the query based upon the formula.

Overrides views_handler_argument::query

File

handlers/views_handler_argument_formula.inc, line 61

Class

views_handler_argument_formula
Abstract argument handler for simple formulae.

Code

public function query($group_by = FALSE) {
    $this->ensure_my_table();
    // Now that our table is secure, get our formula.
    $placeholder = $this->placeholder();
    $formula = $this->get_formula() . ' = ' . $placeholder;
    $placeholders = array(
        $placeholder => $this->argument,
    );
    $this->query
        ->add_where(0, $formula, $placeholders, 'formula');
}