RE: [PHP-DB] Child tables in MySQL

From: Date: Fri, 19 Jan 2001 05:13:51 +0000
Subject: RE: [PHP-DB] Child tables in MySQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-5970@lists.php.net to get a copy of this message
Forgive me.. newbie alert :} I'm trying to make a user homepage with prefs. But I've set it up for each user as a row. I think this may be a dumb question but I want a column to have an attached table per row. Is that possible? If not and I create a table for each user then I'm thinking of having a prefs table and a user_info table. Then from the prefs table have the user_bookmarks. So I tried: CREATE TABLE user_name.user_prefs.user_bookmarks ...... Is that the correct notation? TIA, John On Fri, 19 Jan 2001, Alarion wrote: > You should just be able to create a table like: > > User_Bookmarks > -------------------------- > UB_ID integer PK AI > UB_U_ID integer PK > UB_Bookmark > > (PK = Primary Key > AI = Auto_Increment) > > something like that, your Primary key will be the combination of the > Bookmark ID and the User ID. > > Sean > > -----Original Message----- > From: John Starkey [mailto:jstarkey@advancecreations.com] > Sent: Thursday, January 18, 2001 11:54 PM > To: php-db@lists.php.net > Subject: [PHP-DB] Child tables in MySQL > > > Can anyone tell me how to create child tables in MySQL? I'm creating User > Prefs and need to store bookmarks, and unlimited number. So adding columns > is out of the question. Any other suggestions? > > Thank in advance, > > John > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#5970) next »