Created
September 9, 2017 10:47
-
-
Save Sanix-Darker/828fd35902198f0a94355082b6c4d199 to your computer and use it in GitHub Desktop.
Get the last insert Id (PHP and MySQL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$stmt = $BD->query("SELECT LAST_INSERT_ID()"); | |
$lastId = $stmt->fetch(PDO::FETCH_NUM); | |
$lastId = $lastId[0]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeahhh