summaryrefslogtreecommitdiffstats
path: root/ajax
diff options
context:
space:
mode:
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()) {