Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
API page: http://api.drupal.org/api/drupal/includes--database--query.inc/function/...
Describe the problem you have found:
$field can also be an object, but the docs say:
> $field The name of the field to check. If you would like to add a more complex condition involving operators or functions, use where().
This is done in Views, and I'm told core does this too.
Comments
Comment #1
jhodgdonTrue! good catch.
I'm looking at http://api.drupal.org/api/drupal/includes--database--query.inc/function/... (which I am pretty sure is where the conditions are turned into an actual WHERE clause).
And it is clear from that code that you can pass other QueryConditionInterface objects in for the $field (in order to make a compound condition like (...) OR (...).
This should be added to the doc.
Also note that $value can be a SelectQueryInterface object, so that should also be added to the doc.