Jump to content

member favorites list


mm559

Recommended Posts

Hey everybody, please help a newba out........

 

I am trying to allow users to create a favorites list.

 

Basically there will be a list of links users can access, and I want them to be able to add individual links to their own  favorites list. I'm pretty new to php and mysql, but here's what i'm thinking...

 

User registers.

User gets added to table "users", and a new table is created "new_user_1 favorites"

User clicks "add to my favorites", next to a link they like.

Link is added to "new_user_1 favorites".

Table "new_user_1 favorites" is displayed under link "My Favorites".

 

How does this sound? Is this the way to do it, or is there something i'm missing? Do I really need a individual table for each users favorites, or is there an more efficient way?

 

Any input would be appreciated. Thanks folks.

 

Link to comment
Share on other sites

Hi

 

No need to create a new table for each user (and doing so would make the database hideous to look at rapidly).

 

Have a table of favorites, with one row per user per favorite.

 

ID - Int

User - Int - ID field of the user in the users table

Favorite - Int - ID field of the favorite in the table of possible favorites.

 

All the best

 

Keith

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.