codeigniter 에서 마지막 삽입 id 반환
$id = $this->db->insert_id();
마지막 삽입 id 모델 codeigniter
function add_post($post_data){
$this->db->insert('posts', $post_data);
$insert_id = $this->db->insert_id();
return $insert_id;
}
codeigniter 마지막 삽입 id
$last_inserted_id = $this->db->insert_id();