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