Possible Duplicate:
PHP: how to get last inserted ID of a table?
This is my query for inserting a new post into the posts table (PHP/mysql). Can I return the post_id for the post just inserted in the same statement? I need the post_id for insertion into another table.
mysql_query("INSERT INTO `posts` (`post_id`, `date`, `title`, `content`) VALUES (NULL, NOW(), '$title', '$fileName')");