diff options
author | BlueRaja <BlueRaja.admin@gmail.com> | 2012-09-10 17:47:37 -0500 |
---|---|---|
committer | BlueRaja <BlueRaja.admin@gmail.com> | 2012-09-10 17:47:37 -0500 |
commit | 2ce5e3800ff764870c93038d0c5ed35181225a52 (patch) | |
tree | 275668cfadf0af1b4581b93885ddfee301a4f433 | |
parent | 79d84f2040068424994eecf542fee3686849845c (diff) | |
download | pathery-2ce5e3800ff764870c93038d0c5ed35181225a52.tar.xz |
Doesn't make sense that some of the items don't count today's and others do
-rw-r--r-- | pages/memberlist.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/memberlist.php b/pages/memberlist.php index d75982e..6eef960 100644 --- a/pages/memberlist.php +++ b/pages/memberlist.php @@ -54,11 +54,11 @@ if (isset($_GET['o'])) { $sql = "SELECT
users.ID,
users.displayName,
- (SELECT SUM(moves) FROM solutions WHERE solutions.userID = users.ID) AS totalMoves,
+ (SELECT SUM(moves) FROM solutions WHERE solutions.userID = users.ID AND solutions.dateModified < CURRENT_DATE) AS totalMoves,
(SELECT SUM(moves) FROM solutions
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) AS totalMazes,
+ (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,
IfNull(userData.wallColor, '#666666') as wallColor,
|