Insert data from array in database |
[eluser]zelenkooo[/eluser]
Code: Array I have table in databese with columns name and age, so they are same as in Person object Now i would just like to insert all data from my array ( $arrayOfPersons for example ) to my table in database. I can use foreach and insert one object at a time, but what if i have 200 objects ?? or more ? That could be slow , is there any quicker way to insert whole thing ?
[eluser]Oscar Dias[/eluser]
You can use $this->db->insert_batch(); Code: $data = array( |
Welcome Guest, Not a member yet? Register Sign In |