I have an active record style insert query which has been 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 return value of my query but have been facing issues with it. Have shared my code below:-
Inside the controller:
$post_data = array(
'id' => '',
'user_id' => '11330',
'content' => $this->input->post('poster_textarea'),
'date_time' => date("Y-m-d H:i:s"),
'status' => '1'
I get nothing as the return of the add_post in the model. Could anyone please help me with this?