batchReplace() public method
Creates a batch REPLACE command.
For example,
$connection->createCommand()->batchReplace('idx_user', ['name', 'age'], [ ['Tom', 30], ['Jane', 20], ['Linda', 25], ])->execute();
Note that the values in each row must match the corresponding column names.
public $this batchReplace ( $index, $columns, $rows ) | ||
---|---|---|
$index | string |
The index that new rows will be replaced. |
$columns | array |
The column names |
$rows | array |
The rows to be batch replaced in the index |
return | $this |
The command object itself |
Please login to continue.