summaryrefslogtreecommitdiffstats
path: root/pages/leaderboard.php
diff options
context:
space:
mode:
authorBlueRaja <BlueRaja.admin@gmail.com>2013-01-26 03:30:45 -0600
committerBlueRaja <BlueRaja.admin@gmail.com>2013-01-26 03:30:45 -0600
commitd7b0c04459a6ec42a37255c38d67cea14fb60e61 (patch)
tree4269be8ec67fa3f4d12932041d3b37fa1f007daf /pages/leaderboard.php
parent1e65273d68ffdec07f49c14e929499af21f7776a (diff)
downloadpathery-d7b0c04459a6ec42a37255c38d67cea14fb60e61.tar.xz
Moved usersData table to users table, added a few more columns to users (currently unused)
Diffstat (limited to 'pages/leaderboard.php')
-rw-r--r--pages/leaderboard.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/pages/leaderboard.php b/pages/leaderboard.php
index b5e3a76..cb9a029 100644
--- a/pages/leaderboard.php
+++ b/pages/leaderboard.php
@@ -106,9 +106,9 @@ function getStat ($type, $daysAgo = 1) {
users.displayName as Name,
SUM(solutions.moves) as Moves,
timediff(MAX(dateModified), maps.dateCreated) as Timetaken,
- userData.wallColor,
- userData.wallEmblem,
- userData.displayColor,
+ users.wallColor,
+ users.wallEmblem,
+ users.displayColor,
users.ID as userID,
SUM(CASE WHEN solutions.dateModified < CURDATE()
THEN solutions.championPointsWorth
@@ -118,8 +118,6 @@ function getStat ($type, $daysAgo = 1) {
ON maps.ID = solutions.mapID
JOIN `users`
ON solutions.userID = users.ID
- LEFT JOIN `userData`
- ON users.ID = userData.userID
WHERE $where
GROUP BY solutions.userID
ORDER BY Moves DESC, MAX(dateModified) ASC
@@ -198,9 +196,9 @@ function displayPastMaze($mapType, $name, $daysAgo = 1) {
users.displayName as Name,
SUM(solutions.moves) as Moves,
timediff(solutions.dateModified, maps.dateCreated) as Timetaken,
- userData.wallColor,
- userData.wallEmblem,
- userData.displayColor,
+ users.wallColor,
+ users.wallEmblem,
+ users.displayColor,
users.ID as userID,
solutions.championPointsWorth
FROM `maps`
@@ -210,8 +208,6 @@ function displayPastMaze($mapType, $name, $daysAgo = 1) {
ON solutions.userID = users.ID
JOIN `mapOfTheDay`
ON maps.ID = mapOfTheDay.mapID
- LEFT JOIN `userData`
- ON users.ID = userData.userID
WHERE
maps.ID = '$mapID'
GROUP BY solutions.userID