summaryrefslogtreecommitdiffstats
path: root/pages/memberlist.php
diff options
context:
space:
mode:
authorBlueRaja <BlueRaja.admin@gmail.com>2013-01-13 19:27:39 -0600
committerBlueRaja <BlueRaja.admin@gmail.com>2013-01-13 19:27:39 -0600
commit099e2d5ab8effe07b0e5d8c59e18c81f519fd833 (patch)
treeb23c9a4291b1391382bdf4424bb7a948a287e76d /pages/memberlist.php
parent35307251560e459615f2a3e5ab6572b3f80cfdd9 (diff)
downloadpathery-099e2d5ab8effe07b0e5d8c59e18c81f519fd833.tar.xz
Added totalWins and totalTies columns to the users table. Also, removed all references to the 'statistics' table - it's not needed anymore.
Diffstat (limited to 'pages/memberlist.php')
-rw-r--r--pages/memberlist.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/pages/memberlist.php b/pages/memberlist.php
index 3baf456..2fa2cdc 100644
--- a/pages/memberlist.php
+++ b/pages/memberlist.php
@@ -115,8 +115,8 @@ $sql = "SELECT
WHERE solutions.userID = users.ID AND
solutions.dateModified BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY) AND CURRENT_DATE) AS totalMovesThisWeek,
(SELECT COUNT(*) FROM solutions WHERE solutions.userID = users.ID AND solutions.dateModified < CURRENT_DATE) AS totalMazes,
- SUM(CASE WHEN statistics.type IN (32, 33, 34, 35) THEN statistics.value ELSE 0 END) as totalWins,
- SUM(CASE WHEN statistics.type IN (1, 2, 3, 4) THEN statistics.value ELSE 0 END) as totalTies,
+ users.totalWins,
+ users.totalTies,
IfNull(userData.wallColor, '#666666') as wallColor,
IfNull(userData.displayColor, '#cccccc'),
userData.wallEmblem,
@@ -124,7 +124,6 @@ $sql = "SELECT
users.dateLogin as dateLogin
FROM `users`
LEFT JOIN `userData` ON users.ID = userData.userID
-LEFT JOIN `statistics` ON users.ID = statistics.userID
GROUP BY users.ID
$order
";