You are here

function db_or in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/database.inc \db_or()

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

Return value

\Drupal\Core\Database\Query\Condition A new Condition object, set to "OR" 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 OR conjunction: new Condition('OR');

See also

\Drupal\Core\Database\Query\Condition

Related topics

14 calls to db_or()
Access::query in core/modules/node/src/Plugin/views/filter/Access.php
See _node_access_where_sql() for a non-views query based implementation.
Current::query in core/modules/user/src/Plugin/views/filter/Current.php
Add this filter to the query.
EntityReference::query in core/modules/views/src/Plugin/views/display/EntityReference.php
Add anything to the query that we might need to.
hook_query_TAG_alter in core/lib/Drupal/Core/Database/database.api.php
Perform alterations to a structured query for a given tag.
ManyToOneHelper::addFilter in core/modules/views/src/ManyToOneHelper.php

... See full list

File

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

Code

function db_or() {
  return new Condition('OR');
}