I am currently running a tipping competition where
people tip the team they think will win the given game
or pick the draw.  Each correct entry gets +1 point,
each incorrect entry gets 0 points.  There is 8 games
a round and people submit their entries via a PHP page
that updates a mysql database.  Now for the admin side
of things, to make it easier for admins to update
records accordingly without needing to manually add
them up one by one.

I want a system I can go into where I select the
winners of each round.  If a tipster has any matches
it will credit their accounts +1 for each correct
entry and 0 for each incorrect entry.  There is 8
games a round (on a weekend)  .. So how would I get
the entries to update to the correct amount when I
select the winners.

I'd need the admin page to be something like this.

Game1 : team 1
        team 2

Game2 : team 3
        team 4

and so on, Probably a drop down menu to select the
winner or draw.  So what query would I need or PHP
code to update the database with +1 for correct
matches and 0 for incorrect?  Or would I be better to
have 1 page per game?  I need a safe and reliable way
of doing it.

Also I am going to have a tipster tally.  They will be
in order of total score.  So order will change from
week to week, how can I auto-sort a list using PHP to
display on a page without it messing up the score with
someone else.  So I need the top score to go to the
top but take the name also and not just the score, any

For instance:

Week 1

bob 7
judy 6 
Amanda 5

Week 2

Judy 10
Amanda 9
bob 8

>From week 1 to 2 bob needs to drop down the bottom,
Judy needs to move up one and Amanda is to also move
up one.  I need it to be automatic instead of me
having to do it manually.  Any ideas?  (I think this
was discussed about a month ago, if so I appologise
for the repeat but the help is very appreciated.)

Lastly the games in the week are different from
others.  There is normally a Friday night games, a few
Saturday games and Saturday Night and a few Sunday
games.  I really don't want to lock people out if they
don't submit a tip before the first game.  But I do
want to lock out any tips made for a game that has
already started.  

For instance:

It's 8:05 PM and there was a game to start at 7PM I
want to lock out the tips for the first game but allow
tips for the remaining games.  How can I lock people
out?  Sure I could remove the option on the page but
that does not stop people from loading the page just
before the start of the game and sitting on it till
the game has finished and than submitting their tips. 
I need another way, dynamic pages?  Or something else?
 If the easiest option is to lock people right out
after the first game has started I will, but I'd
prefer to not do that.

Feel free to use any database structure you like, any
table names are ok.  As long as you define what you
mean so I can understand what you mean and I can try
for myself.

Thanks so much in advance, credit will be given.


http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to