db\oci\QueryBuilder batchInsert()

batchInsert() public method

Generates a batch INSERT SQL statement.

For example,

$sql = $queryBuilder->batchInsert('user', ['name', 'age'], [
    ['Tom', 30],
    ['Jane', 20],
    ['Linda', 25],
]);

Note that the values in each row must match the corresponding column names.

public string batchInsert ( $table, $columns, $rows )
$table string

The table that new rows will be inserted into.

$columns array

The column names

$rows array

The rows to be batch inserted into the table

return string

The batch INSERT SQL statement

doc_Yii
2016-10-30 16:58:36
Comments
Leave a Comment

Please login to continue.