Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function db_condition

Same name and namespace in other branches
  1. 8.9.x core/includes/database.inc \db_condition()

Returns a new DatabaseCondition, set to the specified conjunction.

Internal API function call. The db_and(), db_or(), and db_xor() functions are preferred.

Parameters

$conjunction: The conjunction to use for query conditions (AND, OR or XOR).

Return value

DatabaseCondition

Related topics

Database abstraction layer
Allow the use of different database servers using the same code base.
1 call to db_condition()
system_update_7003 in modules/system/system.install
Update {blocked_ips} with valid IP addresses from {access}.

File

includes/database/database.inc, line 2814

Code

function db_condition ($conjunction) {
 return new DatabaseCondition ($conjunction);
}

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