I have an insert query (active record style) used to insert the form fields into a MySQL table. I want to get the last auto-incremented id for the insert operation as the re
From the documentation:
$this->db->insert_id() The insert ID number when performing database inserts.
The insert ID number when performing database inserts.
Therefore, you could use something like this:
$lastid = $this->db->insert_id();