summaryrefslogtreecommitdiffstats
path: root/includes/maps.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/maps.php')
-rw-r--r--includes/maps.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/maps.php b/includes/maps.php
index 431f006..1df258d 100644
--- a/includes/maps.php
+++ b/includes/maps.php
@@ -726,6 +726,19 @@ function getSolution($userID, $mapID) {
}
}
+function getChallengeSolution($userID, $challengeID) {
+ include_once('db.inc.php');
+ $sql = "SELECT `solution`, `moves`
+ FROM `challengeSolutions`
+ WHERE `userID` = '$userID' AND
+ `challengeID` = '$challengeID'
+ ";
+ $result = mysql_query($sql);
+ if (mysql_num_rows($result) > 0) {
+ return mysql_fetch_assoc($result);
+ }
+}
+
function getMapCode($mapID) {
include_once('db.inc.php');
$sql = "SELECT `code`