replace() public method
Creates an REPLACE command.
For example,
$connection->createCommand()->replace('idx_user', [ 'name' => 'Sam', 'age' => 30, ])->execute();
The method will properly escape the column names, and bind the values to be replaced.
Note that the created command is not executed until execute() is called.
public $this replace ( $index, $columns ) | ||
---|---|---|
$index | string |
The index that new rows will be replaced into. |
$columns | array |
The column data (name => value) to be replaced into the index. |
return | $this |
The command object itself |
Please login to continue.