diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/championPoints.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/championPoints.php b/includes/championPoints.php index e824c0c..b99fde3 100644 --- a/includes/championPoints.php +++ b/includes/championPoints.php @@ -107,9 +107,9 @@ function addPlayerChampionPointsForMapsOfTheDay($fromDate) $sql3 = " -- Add the points for doing the weekly maps UPDATE solutions - SET championPointsWorth = + SET championPointsWorth = championPointsWorth + ( - SELECT SUM(".CP_MAX_WORTH_WEEKLY." * + SELECT IFNULL(SUM(".CP_MAX_WORTH_WEEKLY." * ( SELECT COUNT(*) FROM (SELECT * FROM solutions) AS s2 @@ -119,11 +119,12 @@ function addPlayerChampionPointsForMapsOfTheDay($fromDate) SELECT GREATEST(COUNT(*)-1, 1) FROM (SELECT * FROM solutions) AS s2 WHERE s2.mapID = mapOfTheDay.mapID - ) + ".CP_MIN_WORTH_WEEKLY.") + ) + ".CP_MIN_WORTH_WEEKLY."), 0) FROM mapOfTheDay INNER JOIN (SELECT * FROM solutions) AS usersSolutions ON usersSolutions.mapID = mapOfTheDay.mapID WHERE usersSolutions.ID = solutions.ID AND mapOfTheDay.mapType = 5 + AND mapOfTheDay.mapDate >= '$fromDate' ); "; |