Hello all,

this is more MySQL/PHP topic, I hope someone will have an idea.

We have a soccer site, and we want to give our users ability to predict
the result of upcoming matches. So, if we have 32 matches, for each
match user select 1 (home win), x (draw), or 2 (guest win). We expect
that about 3000+ users will play this.

After all matches has been played, we must validate users selection.
That means if we have a table with user_id and 32 columns (for each
match 1 column), we must check each column and validate it against
correct side (home win, draw, guest win). I'm also not sure that 32
column solution is OK, we could also have a table in which each row
present 1 user prediction (user_id, game_id, selection for example).
It's about 100.000 records then, so I believe that looping through the
data would take a while.

So far I have table scores:
team1 varchar(25) not null
team2 varchar(25) not null
score vrachar(3) not null
type char(1) not null

where type field contains 1, x or 2. (the data for validation against
user selection)

Now I'm trying to figure what structure of the table would be best, and
how can I validate the data stored in it against correct results. Of
course, it would be nice to count correct user selections, so we could
post on the website points for each user that participated in the game.

Thanks in advance,

lancelot_

 





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to