codeigniter return last inserted id file fetching the data code example
Example: codeigniter return last inserted id
$this->db->insert('posts', $post_data);
$insert_id = $this->db->insert_id();
return $insert_id;
$this->db->insert('posts', $post_data);
$insert_id = $this->db->insert_id();
return $insert_id;