Multiple table insert question
Posted: Tue Feb 03, 2004 8:28 pm
I am unsure of the best process to use when inserting related data into separate tables. For example, I have a registration form which puts a users login details in one table, their profile information in another, and then some assorted validation data in another.
All the tables have been set up with primary keys, however it is important that all data can be retrieved with one key, ie. a select query with joins.
So, if I write the username and password to one table, how do I put that records primary key into the next table, preferably without making a lookup field?
Perhaps I should remove the primary keys of the other two tables and just push the primary key of the first table in there, but then arises the issue of how to get the primary key back out again.
Any ideas on this one? Thanks
All the tables have been set up with primary keys, however it is important that all data can be retrieved with one key, ie. a select query with joins.
So, if I write the username and password to one table, how do I put that records primary key into the next table, preferably without making a lookup field?
Perhaps I should remove the primary keys of the other two tables and just push the primary key of the first table in there, but then arises the issue of how to get the primary key back out again.
Any ideas on this one? Thanks