public function batchInsert($table, $columns, $rows)
    {
        $time = $this->beginCommand("insert into $table");
        $this->db->createCommand()->batchInsert($table, $columns, $rows)->execute();
        $this->endCommand($time);
    }
public function batchInsert($table, $columns, $rows)
    {
        $time = $this->beginCommand("insert into $table");
        $this->db->createCommand()->batchInsert($table, $columns, $rows)->execute();
        $this->endCommand($time);
    }
public function batchInsert ( $ table , $ columns , $ rows ) { $ time = $ this -> beginCommand ( "insert into $table" ) ; $ this -> db -> createCommand ( ) -> batchInsert ( $ table , $ columns , $ rows ) -> execute ( ) ; $ this -> endCommand ( $ time ) ; }
Creates and executes a batch INSERT SQL statement.
The method will properly escape the column names, and bind the values to be inserted.
@param string $table the table that new rows will be inserted into.
@param array $columns the column names.
@param array $rows the rows to be batch inserted into the table
Creates and executes a batch INSERT SQL statement . The method will properly escape the column names and bind the values to be inserted .