dimanche 24 janvier 2016

Return primary key for the inserted row (PHP adn SQLite)? [duplicate]

This question already has an answer here:

Get the specific primary key, just after inserting row into SQLite, using PHP.

I use PDO prepare-execute, and am not sure how to acchieve this in simplest way.

Should I do a querry just after inserting, something like:

SELECT ID FROM TableX WHERE Data = $data

Thanks

Aucun commentaire:

Enregistrer un commentaire