Re: [PHP] mysql_db_query & INSERT

2006-06-20 Thread Prathaban Mookiah
heers, Prathap -- Original Message --- From: John Nichel <[EMAIL PROTECTED]> To: Sent: Tue, 20 Jun 2006 00:19:20 -0400 Subject: Re: [PHP] mysql_db_query & INSERT > Jay Blanchard wrote: > > [snip] > > How do I retrieve the auto generated primary key field >

Re: [PHP] mysql_db_query & INSERT

2006-06-20 Thread tg-php
After you do your first insert, do: $insertedid = mysql_insert_id(); That will give you the autoincrement ID from the last INSERT you did. Note, this doesn't retrieve the last autoincrement ID from any insert, just the last one for thta specific mysql connection. So you don't have to worry ab

Re: [PHP] mysql_db_query & INSERT

2006-06-20 Thread tedd
At 8:47 AM +0600 6/20/06, Prathaban Mookiah wrote: >I have run into a tricky situation and need some help to work my way through >the problem. I use MySQL. > >I accept some data from the user and insert them into two tables. > >1. I insert part of the data into the first table. I do not specify the

Re: [PHP] mysql_db_query & INSERT

2006-06-19 Thread John Nichel
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

RE: [PHP] mysql_db_query & INSERT

2006-06-19 Thread Jay Blanchard
[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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql_db_query & INSERT

2006-06-19 Thread Chris
Prathaban Mookiah wrote: I have run into a tricky situation and need some help to work my way through the problem. I use MySQL. I accept some data from the user and insert them into two tables. 1. I insert part of the data into the first table. I do not specify the primary key field. It is au

[PHP] mysql_db_query & INSERT

2006-06-19 Thread Prathaban Mookiah
I have run into a tricky situation and need some help to work my way through the problem. I use MySQL. I accept some data from the user and insert them into two tables. 1. I insert part of the data into the first table. I do not specify the primary key field. It is auto generated through auto_i