MySQL Forums
Forum List  »  Newbie

relationship data entry
Posted by: scott Townsend
Date: May 25, 2005 08:04PM

Need help inserting data into tables that have foreign keys. I haven't played w/DB's for about 3 yrs and I am trying to find the easiest way to insert data into one table and having the primary key that is an autonumber, auto insert into the foreign key of the second table. Trying to avoid having to keep track of the autonumbers.

table1 table2
---------- ---------
info info
id(PK)autonumber --> Table.ID(FK)


I was wondering if there is an app out there I can setup to insert data into multiple tables at once and while doing so primary keys are automatically carried over to their foreign key. I'm getting ready to delve into PHP and I'm trying to avoid creating something from scratch that does this. Such as inserting data into the first table then upon entering data into the 2nd table selecting from a list the appropriate record from the 1st table.

Thanks for any help

Options: ReplyQuote


Subject
Written By
Posted
relationship data entry
May 25, 2005 08:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.