Do the second query, call the mysql_insert_id function,
and that will give you the id of the row it just inserted.

On Thu, 2003-06-26 at 11:43, Marie Osypian wrote:
> Hello,
> I have three table in which I am inserting records into in one script.  I
> need to capture the ID of the second tables record insertion to insert into
> a field into a related table in the third.  What would the easiest way to go
> about this in php?
> Thanks,
Linux/Unix Network Administrator
The Cryptocomm Group

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to