You are here: Re: Table schema for user login system? « PHP Programming Language « IT news, forums, messages
Re: Table schema for user login system?

Posted by Shelly on 09/30/07 10:42

"Dikkie Dik" <dikkie@nospam.org> wrote in message
news:46ff73b6$0$27041$bf4948fe@news.tele2.nl...
> Michael Fesser wrote:
>> .oO(Dikkie Dik)
>>
>>> Login tables tend to store a lot of things that just do not belong
>>> there. An account is just an account. It is not a user, and it is not an
>>> activation.
>>
>> In my system one account = one user. The accounts table keeps user
>> names, login names, password hashes, account creation and expiration
>> dates, date of last login, privilege and status flags and such things.
>
> So what do you do if you want to disable login for that user? You'd want
> to remove the account, but not the user. Account data are "live" data,
> while user data are "reference" (read-only) data. Even the nature of these
> entities is very different.

I believe in not overburdening the login table, but not being so restrictive
that I must always go to two tables. For your question I would simply have

select * from foo where username="xxx" and password=["yyy" and active="1"

or something to that effect. Other tables would hold the one to many
relationships for that user.

Shelly

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация