callback_after_insert primary key = 0 ??
- Single Page
Posted 05 October 2012 - 12:25 PM
Very strange..
I'm using the callback_after_insert, but the $primary_key parameter is 0 but the record was inserted correctly...
I check the $this->db->insert_id() inside the callback function and same value... 0,
any ideas ?
thanks
Posted 05 October 2012 - 12:36 PM
$record = $this->db->query('SELECT LAST_INSERT_ID()')-> row_array();
$insert_id = $record['LAST_INSERT_ID()'];
But, anyone knows why ci does not work properly ? maybe a missconfig or something?
Posted 25 February 2019 - 14:41 PM
I have this problem also now ... anybody any idea?