【MySQL】INSERTしたレコードを受け取る

$id = $conn->lastInsertId();

https://www.php.net/manual/ja/pdo.lastinsertid.php

目次