An open API service indexing awesome lists of open source software.

https://github.com/jream/phalcon-batch

Batch Insert Addition
https://github.com/jream/phalcon-batch

Last synced: 10 months ago
JSON representation

Batch Insert Addition

Awesome Lists containing this project

README

          

Phalcon Batch
=============

This is a simple addition to allow batch MySQL INSERT, and MySQL IGNORE INSERT.

## Install
I prefer to use a BaseController whereby all my controllers extend. I also do this
with a BaseModel, but I would suggest placing this in the BaseController.

setRows(['user_id', 'notification_id'])
->setValues([
[23,1],
[24,1],
[25,1],
[26,1],
[27,1],
[28,1],
[29,1],
[30,1],
])->insert();

This could also be a user component if you wanted.