diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2011-12-28 11:19:46 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2011-12-28 11:19:46 -0800 |
commit | fcdb42e572af8a274c3cd6cd904d65bdd2c0ad6b (patch) | |
tree | 512f14831b8880190825a9f92dc924aac228af61 /do.php | |
parent | a2b8ce3fd13701c1b5756e5bc7f03fa1f22ac9a8 (diff) | |
download | pathery-fcdb42e572af8a274c3cd6cd904d65bdd2c0ad6b.tar.xz |
Save last-solution.
Diffstat (limited to 'do.php')
-rw-r--r-- | do.php | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -177,6 +177,15 @@ if ($_GET['r'] == 'getpath') { `mapID` = '$mapID'
";
mysql_query($sql);
+ //Update the solution, if it's the same score.
+ } elseif ($reqMoves == $moves) {
+ $sql = "UPDATE `solutions`
+ SET `moves` = '$moves' ,
+ `solution` = '$solution'
+ WHERE `userID` = '$userID' AND
+ `mapID` = '$mapID'
+ ";
+ mysql_query($sql);
}
} else {
//Store solution.
|