![]() |
[SOLVED] Insert multiple arrays - 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: [SOLVED] Insert multiple arrays (/showthread.php?tid=40215) |
[SOLVED] Insert multiple arrays - El Forum - 04-01-2011 [eluser]RobertB.[/eluser] Hello, Trying to insert different data, types an array and a non array $interval is not an array $services is an array $interval needs to repeat as long as there are items in the service array db table(services2intervals) The serviceId column is where the $service[] array data will go The make2intervalId column is where the $interval data will go Code: id | serviceId | make2intervalId | isActive Sending the data like this Code: <input type="hidden" name="interval" value="' . $interval . '"> Code: function update() { Example var_dump Code: ($services) MODEL Code: function ifRecordExist() { I will like to know how to insert the data and also if there is a better way of doing the whole thing "Best Practice" Thanks |