I'm developing a website for a local Poker tournament. The tournament has many locations that members can go to, with leaderboards for Single Game, Location, State & Major.
Each game is inputed by the client by CSV, broken up and put into the database, updating members details, followed by inserting all game specific details into a games table which looks like this:
ID, TIMESTAMP, LOCATION ID, PLAYER ID, POINTS
What I am trying to do is, when viewing the leaderboard for a particular location, the mySQL Select statement needs to somehow accrue points of players, before displaying the final leaderboard in descending order.
This is what I have at the moment, without consideration for adding points of each player:
Code: Select all
SELECT * FROM games WHERE locationID = $theLocation ORDER BY points DESCCheers.