CodeIgniter get last insert id. Learn how to get last inserted id in codeigniter. You can get the last auto-incremented id immediately after inserting the record into the database.
Read this post on kodingmadesimple.com