From 441d4dde2e64dd9984cf5f7a55621e915210b6d3 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 18 Oct 2014 15:54:16 +1100 Subject: [PATCH] fixed purge command --- .../com/intellectualcrafters/plot/database/DBFunc.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java b/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java index 6e6f237bb..60834e6f7 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java @@ -637,7 +637,7 @@ public class DBFunc { // Fetching a list of plot IDs for a world try { - PreparedStatement stmt = connection.prepareStatement("SELECT `id`, FROM `plot` WHERE `world` = ?"); + PreparedStatement stmt = connection.prepareStatement("SELECT `id` FROM `plot` WHERE `world` = ?"); stmt.setString(1, world); ResultSet result = stmt.executeQuery(); while (result.next()) { @@ -670,8 +670,12 @@ public class DBFunc { stmt.close(); stmt = connection.prepareStatement("DELETE FROM `plot_settings` WHERE `plot_plot_id` = "+idstr+""); - stmt.executeUpdate(); - stmt.close(); + stmt.executeUpdate(); + stmt.close(); + + stmt = connection.prepareStatement("DELETE FROM `plot_trusted` WHERE `plot_plot_id` = "+idstr+""); + stmt.executeUpdate(); + stmt.close(); stmt = connection.prepareStatement("DELETE FROM `plot` WHERE `world` = ?"); stmt.setString(1, world);