sphinx\Command update()

update() public method

Creates an UPDATE command.

For example,

$connection->createCommand()->update('user', ['status' => 1], 'age > 30')->execute();

The method will properly escape the column names and bind the values to be updated.

Note that the created command is not executed until execute() is called.

public $this update ( $index, $columns, $condition = '', $params = [], $options = [] )
$index string

The index to be updated.

$columns array

The column data (name => value) to be updated.

$condition string|array

The condition that will be put in the WHERE part. Please refer to yii\sphinx\Query::where() on how to specify condition.

$params array

The parameters to be bound to the command

$options array

List of options in format: optionName => optionValue

return $this

The command object itself

doc_Yii
2016-10-30 17:11:53
Comments
Leave a Comment

Please login to continue.