Quantcast
Channel: Live News for Yii Framework
Viewing all articles
Browse latest Browse all 3361

[extension] yii-insert-multi-rows

$
0
0
  1. Requirements
  2. Installation
  3. Usage

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);

Viewing all articles
Browse latest Browse all 3361

Trending Articles