I am just trying to get the latest auto generated key from the mysql table from codeiginitor. But it is not working some how. I have tried this code
Message: Undefined property: CI_DB_mysql_driver::$insert_id
This is the code I tried to insert the data and get the insert id,
$id = $this->db->mysql_insert_id();
It is not working for me. I have used DB Driver as "mysql". Then I have installed "mysqli" and changed the DB driver name in database.php like,
$db['default']['dbdriver'] = 'mysqli';
Now it is working fine for me.