Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Richard Trussler
Added: Mar 17, 2018 12:21 PM
Modified: Mar 17, 2018 12:36 PM
Views: 8
Tags: no tags
Insert multiple rows into a table
  1. public function massInsertToTable($tableName, $data){
  2.             $builder=Yii::app()->db->schema->commandBuilder;
  3.             $command = $builder->createMultipleInsertCommand($tableName, $data);
  4.             $command->execute();
  5.            
  6.         }