the ID field in the first table can be an auto-increment field and 
the second table needs to have an ID INT field that is not auto increment.
Insert into the first table, use mysql_insert_id() (or whatever it is) to
get the auto incremented value and then do your second insert using that
value for the ID field.


> -----Original Message-----
> From: Chuck PUP Payne [mailto:[EMAIL PROTECTED]]
> Sent: 24 September 2002 02:45
> To: PHP General
> Subject: Maybe a stupid question but can it be done?
> Ok, Let's try this again, for some reason this didn't post 
> from early today.
> I have db that has two tables that I am needing to post the 
> same information
> into both tables, I can't use ID. So I am want to see if 
> there is a sql
> statement that will let me or how I can do with a php page.
> I am sorry to ask, I have looked around to see if there any 
> on the net or in
> my mysql and php books but this seems like a weird task.
> Chuck Payne
> Magi Design and Support

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to