Re: Related Tables - Capture ID
| From: | Adam Voigt | Date: | Thu, 26 Jun 2003 15:46:02 +0000 |
| Subject: | Re: Related Tables - Capture ID | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28909@lists.php.net to get a copy of this message | ||
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,
>
> MAO
--
Adam Voigt (adam@cryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group