diff --git a/src/main/java/com/gamingmesh/jobs/dao/JobsMySQL.java b/src/main/java/com/gamingmesh/jobs/dao/JobsMySQL.java index 4c2fc9e0..b028690c 100644 --- a/src/main/java/com/gamingmesh/jobs/dao/JobsMySQL.java +++ b/src/main/java/com/gamingmesh/jobs/dao/JobsMySQL.java @@ -147,7 +147,7 @@ public class JobsMySQL extends JobsDAO { return false; } try { - statement.executeQuery("SELECT * FROM " + table); + statement.executeQuery("SELECT * FROM `" + table+"`;"); statement.close(); return true; } catch (SQLException e) { @@ -168,10 +168,11 @@ public class JobsMySQL extends JobsDAO { return false; } try { - statement.executeQuery("SELECT " + collumn + " FROM " + table); + statement.executeQuery("SELECT `" + collumn + "` FROM `" + table + "`;"); statement.close(); return true; } catch (SQLException e) { + e.printStackTrace(); Jobs.consoleMsg("Not a culumn |" + "SELECT " + collumn + " FROM " + table + "|"); close(statement); return false; diff --git a/src/main/java/com/gamingmesh/jobs/dao/JobsSQLite.java b/src/main/java/com/gamingmesh/jobs/dao/JobsSQLite.java index c8ffb499..78e8bf5e 100644 --- a/src/main/java/com/gamingmesh/jobs/dao/JobsSQLite.java +++ b/src/main/java/com/gamingmesh/jobs/dao/JobsSQLite.java @@ -180,7 +180,7 @@ public class JobsSQLite extends JobsDAO { return false; } try { - statement.executeQuery("ALTER TABLE " + table + " ADD " + collumn + " " + type); + statement.executeQuery("ALTER TABLE `" + table + "` ADD `" + collumn + "` " + type); statement.close(); return true; } catch (SQLException e) { @@ -200,7 +200,7 @@ public class JobsSQLite extends JobsDAO { return false; } statement = getConnection().createStatement(); - query = "DELETE FROM " + table + ";"; + query = "DELETE FROM `" + table + "`;"; statement.executeQuery(query); statement.close(); return true;