Multiple row update - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Multiple row update (/showthread.php?tid=37875) |
Multiple row update - El Forum - 01-23-2011 [eluser]PHP Creative[/eluser] Hi there I was wondering if anybody could point me in the right direction to update Multiple rows in Codigniter. Just a link or explanation of what to do? View >>> Code: <? echo form_open("".current_url().""); ?> Bit stuck on what to do next. Got the post array but it doesn't make any sense (keys etc). Any help would be kindly appreciated. Controller >> Code: function Update() { Thanks a million! Multiple row update - El Forum - 01-23-2011 [eluser]BrianJM[/eluser] Please post the output of Code: print_r($_POST); Multiple row update - El Forum - 01-23-2011 [eluser]cahva[/eluser] Roughly something like this: Code: function Update() This is just an example and you should not use it like that. Theres no input checking and you should pass those values to your model which would update the database. But hopefully you'll get the idea. Multiple row update - El Forum - 01-24-2011 [eluser]PHP Creative[/eluser] Hi there! Thank a million for that! Gives me a good idea. I was wondering if that it all possible? Quote: foreach($_POST['FleetID'] as $k=>$v) Thanks a million Multiple row update - El Forum - 01-24-2011 [eluser]cahva[/eluser] No, you cannot do that if you are defining rules to form validation. You only have to create the rules like this: Code: $config = array( |