I have an insert query (active record style) used to insert the form fields into a MySQL table. I want to get the last auto-incremented id for the insert operation as the re
**Inside Model** function add_info($data){ $this->db->insert('tbl_user_info',$data); $last_id = $this->db->insert_id(); return $last_id; } **Inside Controller** public function save_user_record() { $insertId = $this->welcome_model->save_user_info($data); echo $insertId->id; }