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 Bruno Barros on 09/29/07 20:48

> That's one way to do it. But it's not necessarily a good database
> design. If there is information specific to that user, I include it in
> the same table. Among other things, it saves unnecessary joins.

No need to join, just fetch both tables and process the results. Then,

$who_is_logged_in == 1; // Just an example saying the user that is
logged has an ID of 1.
$user_who_is_logged_in_data ==
$data_from_second_table[$who_is_logged_in];

I prefer to do this way. And what I meant was not to do using two
tables, but that it would be more profitable on an abstraction basis,
as you would never have to deal with the first table, which was
absolutely important. Of course you don't need to use my method,
afterall, it's my framework ;).

> But this doesn't belong in a PHP newsgroup, anyway. It's more
> applicable to a database newsgroup.

Doubt it. All they could do was tell you the best way to link the
tables and do all that DB stuff. What we PHPers want is the best
minimal way to get a working user system.

---
Bruno Rafael Moreira de Barros

Adobe Photoshop CS2 and CS3
-
XML / XSLT
-
MySQL / SQLite / TerraDB
-
PHP 3, 4, 5 and 6

:: Looking For A Permanent Job ::
---

 

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

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