You are here

function link_views_handler_argument_target::query in Link 6

Same name and namespace in other branches
  1. 6.2 views/link_views_handler_argument_target.inc \link_views_handler_argument_target::query()
  2. 7 views/link_views_handler_argument_target.inc \link_views_handler_argument_target::query()

Set up the query for this argument.

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

File

views/link_views_handler_argument_target.inc, line 143
Argument handler to filter results by target.

Class

link_views_handler_argument_target
Argument handler to filter results by target.

Code

function query() {
  $this
    ->ensure_my_table();

  // Because attributes are stored serialized, our only option is to also
  // serialize the data we're searching for and use LIKE to find similar data.
  $this->query
    ->add_where(0, $this->table_alias . '.' . $this->real_field . " LIKE '%%%s%'", serialize(array(
    'target' => $this->argument,
  )));
}