Fix Extension SQL Syntax errors related to id selection

This commit is contained in:
Rsl1122 2019-03-20 15:57:12 +02:00
parent da33ec0b9e
commit f31dbe8a9a
2 changed files with 4 additions and 4 deletions

View File

@ -50,9 +50,9 @@ public class ExtensionProviderTable {
public static final String FORMAT_TYPE = "format_type"; // Can be null public static final String FORMAT_TYPE = "format_type"; // Can be null
public static final String IS_PLAYER_NAME = "player_name"; // default false public static final String IS_PLAYER_NAME = "player_name"; // default false
public static final String STATEMENT_SELECT_PROVIDER_ID = SELECT + ID + FROM + TABLE_NAME + public static final String STATEMENT_SELECT_PROVIDER_ID = "(" + SELECT + ID + FROM + TABLE_NAME +
WHERE + PROVIDER_NAME + "=?" + WHERE + PROVIDER_NAME + "=?" +
AND + PLUGIN_ID + "=" + ExtensionPluginTable.STATEMENT_SELECT_PLUGIN_ID; AND + PLUGIN_ID + "=" + ExtensionPluginTable.STATEMENT_SELECT_PLUGIN_ID + ")";
public static void set3PluginValuesToStatement(PreparedStatement statement, int parameterIndex, String providerName, String pluginName, UUID serverUUID) throws SQLException { public static void set3PluginValuesToStatement(PreparedStatement statement, int parameterIndex, String providerName, String pluginName, UUID serverUUID) throws SQLException {
statement.setString(parameterIndex, providerName); statement.setString(parameterIndex, providerName);

View File

@ -43,10 +43,10 @@ public class ExtensionTabTable {
public static final String PLUGIN_ID = "plugin_id"; public static final String PLUGIN_ID = "plugin_id";
public static final String ICON_ID = "icon_id"; public static final String ICON_ID = "icon_id";
public static final String STATEMENT_SELECT_TAB_ID = SELECT + ID + public static final String STATEMENT_SELECT_TAB_ID = "(" + SELECT + ID +
FROM + TABLE_NAME + FROM + TABLE_NAME +
WHERE + TAB_NAME + "=?" + WHERE + TAB_NAME + "=?" +
AND + PLUGIN_ID + "=" + ExtensionPluginTable.STATEMENT_SELECT_PLUGIN_ID; AND + PLUGIN_ID + "=" + ExtensionPluginTable.STATEMENT_SELECT_PLUGIN_ID + ")";
public static void set3TabValuesToStatement(PreparedStatement statement, int parameterIndex, String tabName, String pluginName, UUID serverUUID) throws SQLException { public static void set3TabValuesToStatement(PreparedStatement statement, int parameterIndex, String tabName, String pluginName, UUID serverUUID) throws SQLException {
statement.setString(parameterIndex, tabName); statement.setString(parameterIndex, tabName);