public function SelectQueryExtender::condition
Helper function: builds the most common conditional clauses.
This method can take a variable number of parameters. If called with two parameters, they are taken as $field and $value with $operator having a value of IN if $value is an array and = otherwise.
$field: The name of the field to check. If you would like to add a more complex condition involving operators or functions, use where().
$value: The value to test the field against. In most cases, this is a scalar. For more complex options, it is an array. The meaning of each element in the array is dependent on the $operator.
$operator: The comparison operator, such as =, <, or >=. It also accepts more complex options such as IN, LIKE, or BETWEEN. Defaults to IN if $value is an array, and = otherwise.
QueryConditionInterface The called object.
- SearchQuery::execute in modules/
- Executes the search.
- SearchQuery::executeFirstPass in modules/
- Executes the first pass query.
- SearchQuery::setOption in modules/
- Applies a search option and removes it from the search query string.
database/ select.inc, line 613
- The base extender class for Select queries.