8.5.x database.inc db_and()
8.0.x database.inc db_and()
8.1.x database.inc db_and()
8.2.x database.inc db_and()
8.3.x database.inc db_and()
8.4.x database.inc db_and()
8.6.x database.inc db_and()
7.x database.inc db_and()

Returns a new DatabaseCondition, set to "AND" all conditions together.

Return value

\Drupal\Core\Database\Query\Condition A new Condition object, set to "AND" all conditions together.

Deprecated

as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Create a \Drupal\Core\Database\Query\Condition object, specifying an AND conjunction: new Condition('AND');

See also

\Drupal\Core\Database\Query\Condition

Related topics

5 calls to db_and()
ManyToOneHelper::addFilter in core/modules/views/src/ManyToOneHelper.php
SearchQuery::searchExpression in core/modules/search/src/SearchQuery.php
Sets the search query expression.
Sql::buildCondition in core/modules/views/src/Plugin/views/query/Sql.php
Construct the "WHERE" or "HAVING" part of the query.
StringFilter::opContainsWord in core/modules/views/src/Plugin/views/filter/StringFilter.php
UserSelection::entityQueryAlter in core/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php
Allows the selection to alter the SelectQuery generated by EntityFieldQuery.

File

core/includes/database.inc, line 514
Core systems for the database layer.

Code

function db_and() {
  return new Condition('AND');
}