Page 1 of 1

Multiple Tables?

Posted: Mon May 12, 2008 12:12 pm
by benjaminj88
Alright well I have a few scripts that I am trying to figure out for a project I'm working on. I was curious is it possible to interact with multiple tables at the same time? For instance I would like the people who register to my website to be placed in one table, and once they have activated their account from confirmation e-mail, their information will be moved to a confirmed members table, and drop the information from the previous table? Is this possible?

well thanks for the input

Re: Multiple Tables?

Posted: Mon May 12, 2008 3:41 pm
by califdon
benjaminj88 wrote:Alright well I have a few scripts that I am trying to figure out for a project I'm working on. I was curious is it possible to interact with multiple tables at the same time? For instance I would like the people who register to my website to be placed in one table, and once they have activated their account from confirmation e-mail, their information will be moved to a confirmed members table, and drop the information from the previous table? Is this possible?

well thanks for the input
Of course it's possible, that's what every relational database does. However, before you start doing that, you should review the principles of relational databases, because what you described is generally a bad design concept. A far better design is to use one table and include a field that indicates whether each entry has been confirmed. This greatly simplifies confirming a user, just by updating the `confirmed` field in the record. When authorizing users' access, you merely check that field, in addition to finding the record.