|
|
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]
|