sphinx\Command batchInsert()

batchInsert() public method

Creates a batch INSERT command.

For example,

$connection->createCommand()->batchInsert('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 batchInsert ( $index, $columns, $rows )
$index string

The index that new rows will be inserted into.

$columns array

The column names

$rows array

The rows to be batch inserted into the index

return $this

The command object itself

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

Please login to continue.