This is PHP / CodeIgniter / MySQL
The only way I can think of is to do the insert ($this->db->insert(...)), and then immediatly after, run another query to find the record again.
I'm hoping there is something (which seems a bit more efficient to me) that returns the primary key (or something) of the newly added record.