CodeIgniter Forums
Insert_Batch with update for duplicate key - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: Insert_Batch with update for duplicate key (/thread-66373.html)



Insert_Batch with update for duplicate key - vikrantphp - 10-17-2016

Hi,

I am looking for a function where I can do following.
Insert the records in batch into table when input is provided as array of data to update records along with table name, but when key is not found to update the records it should perform insert.

I am using HMVC for my application.

Any help is much appreciated.

Thanks,
Vikrant.