Please help point me in the right direction before I go crazy :! FYI...I'm using php and mysql
I have a table of teams organized by bracket. So I pull all teams from bracket 5:
Jaguars
Monkeys
Snakes
Parrots
Then I have a list of games
homeTeam homeScore awayTeam awayScore
Jaguars 5 Snakes 9
Snakes 2 Parrots 1
What is the best way to pull all the games for the right bracket and calculate points...3 for a win, 0 for a loss?
Should I pull all teams then for each team pull games where they are home or away team? Or should I put it all into 1 query?
Any guidance is very, very helpful!!