How to store multiple values of a single field in a mysql db
Posted on 2006-06-25
I am using php/mysql.
I am trying to figure out what is the proper way organize multiple values for one field. On my website people play mixes and can choose any mix as one of there favorites.
I can store and view one favorite without issue but I dont know how to deal with multiple "favorites".
Should there be just one field called favorites which has multiple records in it? If this is the case how do I seperate the different "favorites" from one another.
Or should I have several fields such as favorite1,favorite2,favorite3 and have the dynamic table just pull these records.
Or am I completely off base and looking at it in the wrong way? I also have to do this with the friends that users choose. Im really lost on how to set this up. Im pretty good with basic mysql/php but I have never had to store multiple values in this manner before.
Thank you in advance for any help, I really appreciate this site alot!