Multiple Tables?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
benjaminj88
Forum Newbie
Posts: 21
Joined: Fri May 02, 2008 2:31 pm

Multiple Tables?

Post 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
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Multiple Tables?

Post 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.
Post Reply