get the last insert id codeigniter code example Example: return last insert id in codeigniter $id = $this->db->insert_id();