mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-26 10:29:48 -05:00
Fix failed execute SQL make shop reappear when run /qs reload
Former-commit-id: 5188cc4d7ad1a4e98f103ab262642ca60322c2da [formerly 15012cd4c8fd024791d728d9a130d62ed6aaa628] Former-commit-id: a5a55ae7580820655f0b39e5cd6c3e265c987f0c
This commit is contained in:
1 parent
f05ec0428c
commit
9be60ca920
1 file changed
+2
-10
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user