Search for where

  1. Search 7.x for where
  2. Search 9.5.x for where
  3. Search 10.3.x for where
  4. Search 11.x for where
  5. Other projects
Title Object type File name Summary
Condition::where function core/lib/Drupal/Core/Database/Query/Condition.php Adds an arbitrary WHERE clause to the query.
ConditionInterface::where function core/lib/Drupal/Core/Database/Query/ConditionInterface.php Adds an arbitrary WHERE clause to the query.
QueryConditionTrait::where function core/lib/Drupal/Core/Database/Query/QueryConditionTrait.php
QueryPluginBase::setWhereGroup function core/modules/views/src/Plugin/views/query/QueryPluginBase.php Create a new grouping for the WHERE or HAVING clause.
QueryTest::addWhere function core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php
SelectExtender::where function core/lib/Drupal/Core/Database/Query/SelectExtender.php Adds an arbitrary WHERE clause to the query.
Sql::$where property core/modules/views/src/Plugin/views/query/Sql.php An array of sections of the WHERE query. Each section is in itself
an array of pieces and a flag as to whether or not it should be AND
or OR.
Sql::addWhere function core/modules/views/src/Plugin/views/query/Sql.php Add a simple WHERE clause to the query. The caller is responsible for
ensuring that all fields are fully qualified (TABLE.FIELD) and that
the table already exists in the query.
Sql::addWhereExpression function core/modules/views/src/Plugin/views/query/Sql.php Add a complex WHERE clause to the query.
Sql::getWhereArgs function core/modules/views/src/Plugin/views/query/Sql.php Get the arguments attached to the WHERE and HAVING clauses of this query.
UpdateTest::testWhereAndConditionUpdate function core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php Confirms that we can stack condition and where calls.
UpdateTest::testWhereUpdate function core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php Confirms that we can update multiple records with a where call.

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