PHPでの方法です。
$this->dbh = new PDO( 'mysql:dbname='.$this->dbName.';host='.
$this->dbHost, $this->user, $this->pass );
$stmt = $this->dbh->exec(インサート文);
$lastInsertId = $this->dbh->lastInsertId();
で$lastInsertId に直前に挿入したIDの値が入ります。
1票ポチッと押して下さい♪このブログのランキングが少し上がります。