No. I was looking for a way to do it. mysql_insert_id did the job for me. I can't figure out how I missed out on this function. I browsed through the manual for 2 hours yesterday looking for such a function. Anway, thank you Jay and Chris. And you too John, for your attention. Cheers, Prathap ---------- Original Message ----------- From: John Nichel <jnichel@xxxxxxxxxx> To: Sent: Tue, 20 Jun 2006 00:19:20 -0400 Subject: Re: mysql_db_query & INSERT > Jay Blanchard wrote: > > [snip] > > How do I retrieve the auto generated primary key field > > in the first table during the first insert operation. > > [/snip] > > > > http://www.php.net/mysql_insert_id > > > > You mean they have a manual for this stuff?? > > Holy Toledo! > > -- > By-Tor.com > ...it's all about the Rush > http://www.by-tor.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php ------- End of Original Message ------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php