php favourites list
Posted: Mon Jun 15, 2009 2:13 pm
Hi,
What do you all think would be the best way about letting my (logged in) users save there favourite games in a list?
Each game on my games website has a unique id, would it be best to create a new table in my mysql database and link it to the users table? Or is there a way to save a list of the unique game ids in the users table in just one field?
I need to link each result back to a different page so I need to be able to parse the results if possible?
My tables are set out something like this:
Games Table
ID--Game
1---Pacman
2---Mario
3---Space Invaders
etc...
Users Table
Username--Password--fav_games??
user123-----#####
user321-----######
etc...
Favourite Games Table??
Username--Game1--Game2--Game3--Game4--Game5
User123----3---------2---------1
Can anyone tell me the best way to let users save favourite games?
What do you all think would be the best way about letting my (logged in) users save there favourite games in a list?
Each game on my games website has a unique id, would it be best to create a new table in my mysql database and link it to the users table? Or is there a way to save a list of the unique game ids in the users table in just one field?
I need to link each result back to a different page so I need to be able to parse the results if possible?
My tables are set out something like this:
Games Table
ID--Game
1---Pacman
2---Mario
3---Space Invaders
etc...
Users Table
Username--Password--fav_games??
user123-----#####
user321-----######
etc...
Favourite Games Table??
Username--Game1--Game2--Game3--Game4--Game5
User123----3---------2---------1
Can anyone tell me the best way to let users save favourite games?