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