<分区>
Possible Duplicate:
PHP: how to get last inserted ID of a table?
这是我在 posts 表 (PHP/mysql) 中插入新帖子的查询。我可以返回刚刚插入到同一语句中的帖子的 post_id 吗?我需要 post_id 才能插入到另一个表中。
mysql_query("INSERT INTO `posts` (`post_id`, `date`, `title`, `content`) VALUES (NULL, NOW(), '$title', '$fileName')");