summaryrefslogtreecommitdiffstats
path: root/includes/datas.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-01-09 16:54:12 -0800
committerPatrick Davison <snapwilliam@gmail.com>2013-01-09 16:54:12 -0800
commit4de2151306cee8ad7983f201a74d15a44d2b06b7 (patch)
tree3b16bdc62f8cdd3765dd64da3b45f99b096b80e2 /includes/datas.php
parent16567167343024754247818e92115ed83255ed0d (diff)
downloadpathery-4de2151306cee8ad7983f201a74d15a44d2b06b7.tar.xz
Challenges, massEmail functions started
Diffstat (limited to 'includes/datas.php')
-rw-r--r--includes/datas.php9
1 files changed, 8 insertions, 1 deletions
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();