PHP PDO lastInsertId() method with examples in MySQL
MySQL has an AUTO_INCREMENT
column attribute which automatically generates a consistent integer value upon a successful (or not) INSERT
. Oftentimes, this attribute is set on a column deemed the PRIMARY KEY
. Therefore, providing a unique…