pdo:get_the_last_insert_id
PDO - Get the Last Insert Id
With PDO you just do run the lastInsertId method.
<?php $result = $db->exec("INSERT INTO table(firstname, lastname) VAULES('John', 'Doe')"); $insertId = $db->lastInsertId();
pdo/get_the_last_insert_id.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1