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
A transaction isn't needed here, this should suffice:
function add_post($post_data) { $this->db->insert('posts',$post_data); return $this->db->insert_id(); }