diff --git a/src/main/java/org/maxgamer/quickshop/Database/DatabaseHelper.java b/src/main/java/org/maxgamer/quickshop/Database/DatabaseHelper.java index 60fd8f3f2..55137abe5 100644 --- a/src/main/java/org/maxgamer/quickshop/Database/DatabaseHelper.java +++ b/src/main/java/org/maxgamer/quickshop/Database/DatabaseHelper.java @@ -78,22 +78,14 @@ public class DatabaseHelper { return ps.executeQuery(); } - public static ResultSet removeShop(Database db, int x, int y, int z, String worldName) throws SQLException { + public static void removeShop(Database db, int x, int y, int z, String worldName) throws SQLException { // db.getConnection().createStatement() // .executeUpdate("DELETE FROM " + QuickShop.instance.getDbPrefix() + "shops WHERE x = " + x + " AND y = " + y // + " AND z = " + z + " AND world = \"" + worldName + "\"" // + (db.getCore() instanceof MySQLCore ? " LIMIT 1" : "")); String sqlString = "DELETE FROM "+QuickShop.instance.getDbPrefix()+"shops WHERE x = '"+x+"' AND y = '"+y+"' AND z ='"+z+"' AND world = '"+worldName+"'"+(db.getCore() instanceof MySQLCore ? " LIMIT 1" : ""); - PreparedStatement ps = db.getConnection().prepareStatement(sqlString); - // PreparedStatement ps = db.getConnection().prepareStatement() -// -// -// -// // -// + (db.getCore() instanceof MySQLCore ? " LIMIT 1" : "")); - //"DELETE FROM shops WHERE x = '" + x + "' AND y = '" + y + "' AND z = '" + z + "' AND world = '" + world + "'" - return ps.executeQuery(); + db.execute(sqlString); } public static void updateOwner2UUID(String ownerUUID, int x, int y, int z, String worldName) throws SQLException { QuickShop.instance.getDB().getConnection().createStatement()