SELECT LAST_INSERT_ID()
取这条记录的id(此id是AUTO_INCREMENT)
当时第一反应会不会有线程安全的问题
查看MySQL文档 http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id
其中
The ID that was generated is maintained in the server on a per-connection basis
说明是线程安全的