db\QueryBuilder buildInCondition()

buildInCondition() public method

Creates an SQL expressions with the IN operator.

public string buildInCondition ( $operator, $operands, &$params )
$operator string

The operator to use (e.g. IN or NOT IN)

$operands array

The first operand is the column name. If it is an array a composite IN condition will be generated. The second operand is an array of values that column value should be among. If it is an empty array the generated expression will be a false value if operator is IN and empty if operator is NOT IN.

$params array

The binding parameters to be populated

return string

The generated SQL expression

throws yii\db\Exception

if wrong number of operands have been given.

doc_Yii
2016-10-30 16:59:13
Comments
Leave a Comment

Please login to continue.