webCOMAND

query::or_where_in()

Adds an IN comparison to the cQL WHERE clause.  A logical OR will be used to combine it with any existing where expressions.

Prototype

or_where_in(string $field, array $values): query

Parameters

  • field - An expression (typically just the Identifier of a content type field) to compare to each of the values.
  • values - An array of values to compare the field value to.

Return

The updated query object is returned.  This is handy for chaining additional methods.

Example

// equivalent to WHERE Title='Home' OR Status IN ('Active','Live')
$query->where('Title', 'Home');
$query->or_where_in('Status', ['Active', 'Live']);