In my form, there are values to be inserted to multiple tables.
After inserting to the first table, i have to insert the other values,
along with the ‘id’ of the entry to first table as reference. What is the
best way to do this? Is there any codeigniter specific way?
In my form, there are values to be inserted to multiple tables. After inserting
Share
$this->db->insert_id()may be what you’re looking for. Here’s an example of how it could work: