From 4de2151306cee8ad7983f201a74d15a44d2b06b7 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Wed, 9 Jan 2013 16:54:12 -0800 Subject: Challenges, massEmail functions started --- includes/datas.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'includes/datas.php') diff --git a/includes/datas.php b/includes/datas.php index 6cc8f07..e99e347 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -1135,7 +1135,8 @@ function loadChallengeListing($userIdUnsanitized) { $userID = mysql_escape_string($userIdUnsanitized); $sql = " - SELECT maps.ID AS mapID, maps.challengeTier, maps.name, challengeSolutions.dateSolved + SELECT maps.ID AS mapID, maps.challengeTier, maps.name AS name, + challengeSolutions.dateSolved, challengeSolutions.challengeID AS challengeID FROM maps INNER JOIN challenges ON maps.ID = challenges.mapID LEFT JOIN challengeSolutions ON challenges.ID = challengeSolutions.challengeID @@ -1144,6 +1145,12 @@ function loadChallengeListing($userIdUnsanitized) AND maps.challengeTier <= (SELECT challengeTier FROM users WHERE users.ID = '$userID') ORDER BY maps.challengeTier, maps.challengeSuborder, challenges.ordering "; + $sql = " SELECT maps.ID AS mapID, maps.challengeTier, maps.name AS name, + challengeSolutions.dateSolved, challengeSolutions.challengeID AS challengeID + FROM challenges + LEFT JOIN maps ON challenges.mapID = maps.ID + LEFT JOIN challengeSolutions ON challenges.ID = challengeSolutions.challengeID AND challengeSolutions.userID = '$userID' + ORDER BY maps.challengeTier, maps.challengeSuborder, challenges.ordering"; $result = mysql_query($sql); echo mysql_error(); -- cgit v1.2.3