Im trying to get the mysql_insert_id using PDO.
Thus far i’ve not found a good example that works with both inserting and updating.
Does anyone have a piece of complete code as example?
Im trying to get the mysql_insert_id using PDO. Thus far i’ve not found a
Share
If you need
$pdo->lastInsertId()to return the id of the row just updated (I would seriously reconsider my design if I needed it but hey… can be a true need), do the update like this: