webCOMAND

query::where_in()

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

Prototype

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 Status IN ('Active','Live')
$query->where_in('Status', ['Active', 'Live']);