【PHP】MySQL 取得新 INSERT 的 autoincrement 欄位值

$rs = mysql_query("INSERT INTO test (name) VALUES ('oldgrayduck')");

$a = mysql_insert_id();

echo "Insert sequence value: ".$a;