![]() |
Using $this->db->insert_id(); - 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: Using $this->db->insert_id(); (/showthread.php?tid=35502) |
Using $this->db->insert_id(); - El Forum - 11-01-2010 [eluser]snowstar[/eluser] Hi All, Im having some issues using $this->db->insert_id(); i think this is mostly due to not knowing how to use it properly. Basically im inserting data into two tables from one form, using $this->db->insert_id(); to recall the id used in the first array. below is my controller and the error im getting. can any one help point me in the right direction? My controller Code: function add() The Error Quote:A Database Error Occurred Using $this->db->insert_id(); - El Forum - 11-01-2010 [eluser]snowstar[/eluser] and two seconds after i post this i see where i went wrong The fix Code: 'orderid' => $id |