You are here

public function ConditionInterface::where in Drupal 8

Same name and namespace in other branches
  1. 9 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 = []);