function views_handler_argument::query

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

Set up the query for this argument.

The argument sent may be found at $this->argument.

Overrides views_handler::query

11 methods override views_handler_argument::query()
views_handler_argument_broken::query in handlers/views_handler_argument.inc
Set up the query for this argument.
views_handler_argument_comment_user_uid::query in modules/comment/views_handler_argument_comment_user_uid.inc
Set up the query for this argument.
views_handler_argument_formula::query in handlers/views_handler_argument_formula.inc
Build the query based upon the formula
views_handler_argument_group_by_numeric::query in handlers/views_handler_argument_group_by_numeric.inc
Set up the query for this argument.
views_handler_argument_many_to_one::query in handlers/views_handler_argument_many_to_one.inc
Set up the query for this argument.

... See full list

File

handlers/views_handler_argument.inc, line 683

Class

views_handler_argument
Base class for arguments.

Code

function query() {
    $this->ensure_my_table();
    $placeholder = empty($this->definition['numeric']) ? "'%s'" : '%d';
    $this->query
        ->add_where(0, "{$this->table_alias}.{$this->real_field} = {$placeholder}", $this->argument);
}