Question : last insert id model codeigniter
Answered by : confused-chipmunk-nyedd7qqp54w
function add_post($post_data){ $this->db->insert('posts', $post_data); $insert_id = $this->db->insert_id(); return $insert_id;
}
Source : https://stackoverflow.com/questions/16440366/how-to-get-last-insert-id-after-insert-query-in-codeigniter-active-record | Last Update : Tue, 08 Sep 20
Question : codeigniter return last inserted id
Answered by : rafeek
$this->db->insert('posts', $post_data); $insert_id = $this->db->insert_id(); return $insert_id;
Source : | Last Update : Sat, 03 Oct 20
Question : codeigniter last insert id
Answered by : misty-mandrill-res78b5o3ute
$last_inserted_id = $this->db->insert_id();
Source : | Last Update : Mon, 08 Mar 21