From 8efdbed0b46beb1f1bca44d62f8761ba2cd3efed Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Thu, 3 Feb 2022 15:12:59 -0600 Subject: [PATCH] Fix SQL in PHP for NewImage --- .../main/resources/extracted/web/standalone/MySQL_tiles.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DynmapCore/src/main/resources/extracted/web/standalone/MySQL_tiles.php b/DynmapCore/src/main/resources/extracted/web/standalone/MySQL_tiles.php index 7f8a1c60..b26df7a9 100644 --- a/DynmapCore/src/main/resources/extracted/web/standalone/MySQL_tiles.php +++ b/DynmapCore/src/main/resources/extracted/web/standalone/MySQL_tiles.php @@ -81,7 +81,7 @@ if (count($fparts) == 3) { // zoom_x_y } initDbIfNeeded(); -$stmt = $db->prepare('SELECT t.newImage,t.Image,t.Format,t.HashCode,t.LastUpdate FROM ' . $dbprefix . 'Maps m JOIN ' . $dbprefix . 'Tiles t WHERE m.WorldID=? AND m.MapID=? AND m.Variant=? AND m.ID=t.MapID AND t.x=? AND t.y=? and t.zoom=?'); +$stmt = $db->prepare('SELECT t.NewImage,t.Image,t.Format,t.HashCode,t.LastUpdate FROM ' . $dbprefix . 'Maps m JOIN ' . $dbprefix . 'Tiles t WHERE m.WorldID=? AND m.MapID=? AND m.Variant=? AND m.ID=t.MapID AND t.x=? AND t.y=? and t.zoom=?'); $stmt->bind_param('sssiii', $world, $prefix, $variant, $x, $y, $zoom); $res = $stmt->execute(); $stmt->bind_result($tnewimage, $timage, $format, $thash, $tlast); @@ -94,7 +94,7 @@ if ($stmt->fetch()) { header('ETag: \'' . $thash . '\''); header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $tlast / 1000) . ' GMT'); if ($tnewimage) { - echo $tnewimage + echo $tnewimage; } else { echo $timage; }