How to do multiple conditions for db_update by using OR condition? I would like to convert the following UpdateQuery statement to work with multiple conditions by using OR instead of the default AND condition.
db_update('system')
  -&gt;fields(array('status' =&gt; 1))
  -&gt;condition('type', 'theme')
  -&gt;condition('name', 'seven') // OR
  -&gt;condition('name', 'rubik')
  -&gt;execute();

Is it possible?
Drupal 7
Yes, it is possible by using db_or() as in the following example.
db_update('system')
  -&gt;fields(array('status' =&gt; 1))
  -&gt;condition('type', 'theme')
  -&gt;condition(db_or()
    -&gt;condition('name', 'seven')
    -&gt;condition('name', 'rubik')
  )
  -&gt;execute();

For db_select(), see the answers given in  &quot;OR&quot; condition in db_select() and Nested OR and AND condition with db_select.
Drupal 8
You can still use db_or() as in Drupal 7, but it's deprecated in Drupal 8.0.x and removed in Drupal 9.0.0. Instead, a \Drupal\Core\Database\Query\Condition object should be created as in the following code, taken from BooleanOperator::queryOpBoolean().
if ($this-&gt;accept_null) {
  if ($query_operator === self::EQUAL) {
    $condition = (new Condition('OR'))
      -&gt;condition($field, 0, $query_operator)
      -&gt;isNull($field);
  }
  else {
    $condition = (new Condition('AND'))
      -&gt;condition($field, 0, $query_operator)
      -&gt;isNotNull($field);
  }
  $this-&gt;query-&gt;addWhere($this-&gt;options['group'], $condition);
}