Creates and executes an INSERT SQL statement for several rows.
Requirements ¶
Yii 1.1 or above
Installation ¶
For insert multi rows, Put this code in components
folder under GeneralRepository.php
file name.
Usage ¶
$rows = array(
array('id' => 1, 'name' => 'John'),
array('id' => 2, 'name' => 'Mark')
);
GeneralRepository::insertSeveral(User::model()->tableName(), $rows);
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.