MySQLで最後に挿入したデータのPRYMARY値を得る

my $sth = $db->prepare("select LAST_INSERT_ID();");
$sth->execute;
my @row = $sth->fetchrow_array;
$sth->finish;
my $last_inserted_id = $row[0];

最終更新:2011年09月29日 09:11
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。