MySQL 中有自增列,那如何获得插入语句生成的自增列 ID 呢?

在 MySQL 中用 last_insert_id() 函数;

在 PHP 中用 mysql_insert_id() 函数。