summaryrefslogtreecommitdiffstats
path: root/ajax
diff options
context:
space:
mode:
authorBlueRaja <BlueRaja.admin@gmail.com>2013-03-23 21:05:44 -0500
committerBlueRaja <BlueRaja.admin@gmail.com>2013-03-23 21:05:44 -0500
commit48b59dd1be231cc8c1ac94b9fd51193cef270970 (patch)
tree2828a28af0c71a848a1e088c273f6b74eb9eae8b /ajax
parenta794485cdedbb7cea31efb69916c062ed51262fa (diff)
downloadpathery-48b59dd1be231cc8c1ac94b9fd51193cef270970.tar.xz
BUGFIX: Dates before the first Ultra Complex show the first Ultra Complex on the scores page
Diffstat (limited to 'ajax')
-rw-r--r--ajax/maps.ajax.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/ajax/maps.ajax.php b/ajax/maps.ajax.php
index 8ceade5..25fbbf8 100644
--- a/ajax/maps.ajax.php
+++ b/ajax/maps.ajax.php
@@ -60,12 +60,13 @@ function getMapIDsByDate($date) {
SELECT mapType, MIN(mapExpireTime) AS mapExpireTime
FROM mapOfTheDay
WHERE mapExpireTime > ?
+ AND mapDate <= ?
GROUP BY mapType
) AS expireTimes ON mapOfTheDay.mapType = expireTimes.mapType
AND mapOfTheDay.mapExpireTime = expireTimes.mapExpireTime
GROUP BY mapOfTheDay.mapType";
$stmt = $mysqli->prepare($sql);
- $stmt->bind_param("s", $date);
+ $stmt->bind_param("ss", $date, $date);
$stmt->execute();
$stmt->bind_result($mapID);
while ($stmt->fetch()) {