maybe you could solve this like that: before querying your db, you should have a $created-variable ....use microtime() or whatelse you like. then you have another uniq 'id' you can ask for the id of the tuple you added to your table before... im sure there is another, easier way, maybe with mysql-function (last-affected-row - i dont know) - but im postgres user :) and do it like i described before also for other reasons (its fine to have a timestamp...). volker ----- Original Message ----- From: "Marie Osypian" <mosypian@savingforcollege.com> To: <php-db@lists.php.net> Sent: Thursday, June 26, 2003 5:43 PM Subject: Related Tables - Capture ID > 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 > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php