Here's what I got. I'm relatively new to the php scene, but I'd like to think that I'm a quick learner.
I can't go much into detail, but to give you an idea, my company is running an event with local celebs. During the course of the event, there are going to be 15 different competitions that the celebs and company execs will be participating in. Not everyone will be participating in all of the events, though.
I'm creating a form using php and mysql to to allow onlookers to predict which of the contestants will win each competition. At the end of the event, winners will be chosen and given prizes for the most number of correct answers. Creating the forms will be simple, dynamically generated, but my question lies with the best way to store the guesses of each audience member who votes.
My dB is structured like so:
Competitions
|- comp_id (unique id for the competition)
|- comp_name (competition name, i.e. pie eating)
|- comp_desc (a short description of the competition)
|-winner_id (id of the contestant who wins, will be filled in after event)
Contestants
|- cont_id (unique id for contestant)
|- cont_name (contestant's name)
|- comp_id (id for competition that contestant is participating in.)
|-cont_bio (short contestant bio/description)
Entries
|- f_name (entrant's first name)
|- l_name (entrant's last name)
|- email (entrant's email address)
|- ?????
Now, what I want to know is, how do I go about storing the 15 guesses for each entry, so that I can go back to do comparisons and give scores for entrants on a tally page. Will I need to create 15 additional fields in the entries table to store the guess for each competition, or is there a better way to do this? Keep in mind that they need to be stored until winner results are comiled AFTER the event is over. Any suggestions are GREATLY appreciated.