I have this code
if($pdo instanceof PDO){
$this->last = 'lastInsertId';
}
else{
$this->last = 'insert_id';
}
When i do the insert query in the datebase, how can i get the last inserted ID. I tried like this
$this->db->{$this->last};
But it did not work.
Thanks for the help in advance.