From 0b2248de9ae7af1c152fcfa6c5e7b1ae1de216a2 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 30 Mar 2019 18:33:21 +0100 Subject: [PATCH] SchemMember bugfix --- src/de/warking/hunjy/MySQL/SchematicMember.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de/warking/hunjy/MySQL/SchematicMember.java b/src/de/warking/hunjy/MySQL/SchematicMember.java index b1edeaf..55a5ac0 100644 --- a/src/de/warking/hunjy/MySQL/SchematicMember.java +++ b/src/de/warking/hunjy/MySQL/SchematicMember.java @@ -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 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 schematicMembers = new ArrayList<>(); while(schematicMember.next()){ @@ -77,7 +77,7 @@ public class SchematicMember { } public static List 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 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 + "'"); } }