php/sql design help [message #32704] |
Sun, 16 July 2006 13:55 |
|
esm2002
Messages: 339 Registered: May 2002 Location: Atlanta Georgia
Karma:
|
Senior Member |
|
|
ok, i need some help...
I'm working on a site where I want to use a common set of php scripts but a different set of sql tables for each user. and each user would not have access to nor see the other user information. all the tables for one user would be in a separate mysql database (at least that is my thought).
the user would just login and use (add, update, access) sql tables that i would create just for him. the tables themselves would be the same except for the data in them.
I would appreciate your thoughts on how to implement something like this.
here are mine.
i'm thinking of table names using the user id plus the basic table name. something like
user_one:
user_one_config, user_one_events, user_one_locations,
user_one_equipment
user_two
user_two_config, user_two_events, user_two_locations,
user_two_equipment
user_three
user_three_config, user_three_events,
user_three_locations, user_three_equipment
within view_events.php I could have something like:
$config_table = $user_config_table;
$events_table = $user_events_table;
$locations_table = $user_locations_table;
(although instead of $user_events_table it maybe
something like $_COOKIE['user_acct']. "events". see
below)
how does all this sound?
Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
|
|
|