Shortened blockstats query.

This commit is contained in:
Robin Kupper
2011-04-05 23:55:28 +02:00
parent 094f59b09c
commit e07f81f82d

View File

@@ -42,7 +42,7 @@ public class BlockStats implements Runnable
SimpleDateFormat formatter = new SimpleDateFormat("MM-dd HH:mm:ss"); SimpleDateFormat formatter = new SimpleDateFormat("MM-dd HH:mm:ss");
try { try {
conn.setAutoCommit(false); conn.setAutoCommit(false);
ps = conn.prepareStatement("SELECT * FROM `" + table + "` LEFT JOIN `" + table + "-sign` USING (`id`) INNER JOIN `lb-players` USING (`playerid`) WHERE `x` = ? AND `y` = ? AND `z` = ? ORDER BY `date` DESC LIMIT 15"); ps = conn.prepareStatement("SELECT date, replaced, type, signtext, playername FROM `" + table + "` LEFT JOIN `" + table + "-sign` USING (id) INNER JOIN `lb-players` USING (playerid) WHERE x = ? AND y = ? AND z = ? ORDER BY date DESC LIMIT 15");
ps.setInt(1, block.getX()); ps.setInt(1, block.getX());
ps.setInt(2, block.getY()); ps.setInt(2, block.getY());
ps.setInt(3, block.getZ()); ps.setInt(3, block.getZ());