function db_and
Same name in other branches
- 7.x includes/database/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
in drupal:8.0.0 and is removed from drupal:9.0.0. Create a \Drupal\Core\Database\Query\Condition object, specifying an AND conjunction: new Condition('AND');
See also
https://www.drupal.org/node/2993033
\Drupal\Core\Database\Query\Condition
Related topics
1 call to db_and()
- DatabaseLegacyTest::testDbAnd in core/
tests/ Drupal/ KernelTests/ Core/ Database/ DatabaseLegacyTest.php - Tests deprecation of the db_and() function.
File
-
core/
includes/ database.inc, line 553
Code
function db_and() {
@trigger_error('db_and() is deprecated in drupal:8.0.0. It will be removed from drupal:9.0.0. Create a \\Drupal\\Core\\Database\\Query\\Condition object, specifying an AND conjunction: new Condition(\'AND\'), instead. See https://www.drupal.org/node/2993033', E_USER_DEPRECATED);
return new Condition('AND');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.