1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 14:05:25 +01:00

missing ` for mysql syntax

This commit is contained in:
Zrips 2017-10-01 12:45:28 +03:00
parent 7f84a923a7
commit 262c250cbe
2 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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;