When I use an if-then-else to check if a record exists then call the last insert using $pdocon->lastInsertId() it does not return the inserted row. For example:<
$pdocon->lastInsertId()