Inserting Multiple Records with Active Record - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Inserting Multiple Records with Active Record (/showthread.php?tid=9187) |
Inserting Multiple Records with Active Record - El Forum - 06-16-2008 [eluser]AgentPhoenix[/eluser] Does anyone know if the AR method $this->db->insert() accepts a multi-dimensional array if I want to insert multiple rows? Update: found out that you can't feed it a multi-dimensional array. Any ideas how I might insert a lot of rows without having to write a ton of individual arrays? Inserting Multiple Records with Active Record - El Forum - 06-16-2008 [eluser]Bramme[/eluser] Loop through it with a foreach and insert per subarray? |