Category: PHP, git

In a project, there was requirement to add records in large numbers and the project was based on Phalcon. I thought that it would be easy task because it is just an insert task so in my mind I already planned sql queries for this and it goes like this; Pretty easy hmm.. However, soon the easiness fade away because PHQL (Phalcon SQL) doesn’t allow multiple insert query even if you run it as transaction query ,and in return it gives error “unexpected comma in statement”.

This small issue wasted my whole day and when, in evening full exhausted by trying all possible solution, I’m about agree that there is no way run the multiple insert query.

I know there are more people like me searching for solution so here is the solution.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Community Partners