function ConditionInterface::where

Same name in other branches
  1. 9 core/lib/Drupal/Core/Database/Query/ConditionInterface.php \Drupal\Core\Database\Query\ConditionInterface::where()
  2. 8.9.x core/lib/Drupal/Core/Database/Query/ConditionInterface.php \Drupal\Core\Database\Query\ConditionInterface::where()
  3. 11.x core/lib/Drupal/Core/Database/Query/ConditionInterface.php \Drupal\Core\Database\Query\ConditionInterface::where()

Adds an arbitrary WHERE clause to the query.

Parameters

string $snippet: A portion of a WHERE clause as a prepared statement. It must use named placeholders, not ? placeholders. The caller is responsible for providing unique placeholders that do not interfere with the placeholders generated by this QueryConditionInterface object.

array $args: An associative array of arguments keyed by the named placeholders.

Return value

$this The called object.

2 methods override ConditionInterface::where()
Condition::where in core/lib/Drupal/Core/Database/Query/Condition.php
Adds an arbitrary WHERE clause to the query.
SelectExtender::where in core/lib/Drupal/Core/Database/Query/SelectExtender.php
Adds an arbitrary WHERE clause to the query.

File

core/lib/Drupal/Core/Database/Query/ConditionInterface.php, line 89

Class

ConditionInterface
Interface for a conditional clause in a query.

Namespace

Drupal\Core\Database\Query

Code

public function where($snippet, $args = []);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.