I have products feeds and want to insert it in one query in ZF2. Is there any feature in ZF2 that make it easier?
My Blog : http://programming-tips.in
I have products feeds and want to insert it in one query in ZF2. Is there any feature in ZF2 that make it easier?
My Blog : http://programming-tips.in
In ZF1, to allow this, I extended the Mysql Adapter and added an extendedInsert method.
Of course, the easier route is just to surround your inserts with a transaction/commit as commented above. Shoving multiple inserts through in a single transaction is about the same as doing an extended insert as far as how much time it takes. Plus, you should be able to use a prepared statement and just iterate through your array to insert all the records.