Posted On: Apr 25, 2024
CodeIgniter DB Class insert_id() method is used to get last insert id.
Usage:
function add_post($post_data){ $this->db->insert('posts', $post_data); $insert_id = $this->db->insert_id(); return $insert_id; }
Never Miss an Articles from us.
What is the current version of Codeigniter?..
How to check the version of CodeIgniter framework?..