SteamWar/SpigotCore
Archiviert
13
0

SchemMember bugfix

Dieser Commit ist enthalten in:
Lixfel 2019-03-30 18:33:21 +01:00
Ursprung 499af7d28d
Commit 0b2248de9a

Datei anzeigen

@ -41,7 +41,7 @@ public class SchematicMember {
}
public static SchematicMember getSchemMemberFromDB(String schemName, int schemOwner, int schemMember){
ResultSet schematicMember = sql.select("SELECT * FROM SchematicMember WHERE SchemName = '" + schemName + "' AND SchemOwner = '" + schemOwner + "' AND Member = '" + schemMember + "'");
ResultSet schematicMember = sql.select("SELECT * FROM SchemMember WHERE SchemName = '" + schemName + "' AND SchemOwner = '" + schemOwner + "' AND Member = '" + schemMember + "'");
try {
if(schematicMember == null || !schematicMember.next()){
return null;
@ -58,7 +58,7 @@ public class SchematicMember {
}
public static List<SchematicMember> getSchemMembers(String schemName, int schemOwner){
ResultSet schematicMember = sql.select("SELECT * FROM SchematicMember WHERE SchemName = '" + schemName + "' AND SchemOwner = '" + schemOwner + "'");
ResultSet schematicMember = sql.select("SELECT * FROM SchemMember WHERE SchemName = '" + schemName + "' AND SchemOwner = '" + schemOwner + "'");
try {
List<SchematicMember> schematicMembers = new ArrayList<>();
while(schematicMember.next()){
@ -77,7 +77,7 @@ public class SchematicMember {
}
public static List<SchematicMember> getAccessibleSchems(int schemMember){
ResultSet schematicMember = sql.select("SELECT * FROM SchematicMember WHERE Member = '" + schemMember + "'");
ResultSet schematicMember = sql.select("SELECT * FROM SchemMember WHERE Member = '" + schemMember + "'");
try {
List<SchematicMember> schematicMembers = new ArrayList<>();
while(schematicMember.next()){
@ -105,6 +105,6 @@ public class SchematicMember {
}
public void remove(){
sql.update("DELETE FROM Schematic WHERE SchemOwner = " + SchemOwner + " AND SchemName = '" + SchemName + "' AND Member = '" + Member + "'");
sql.update("DELETE FROM SchemMember WHERE SchemOwner = " + SchemOwner + " AND SchemName = '" + SchemName + "' AND Member = '" + Member + "'");
}
}