function ConditionInterface::where
Same name in other branches
- 9 core/lib/Drupal/Core/Database/Query/ConditionInterface.php \Drupal\Core\Database\Query\ConditionInterface::where()
- 8.9.x core/lib/Drupal/Core/Database/Query/ConditionInterface.php \Drupal\Core\Database\Query\ConditionInterface::where()
- 10 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 - SelectExtender::where in core/
lib/ Drupal/ Core/ Database/ Query/ SelectExtender.php
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\QueryCode
public function where($snippet, $args = []);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.