diff --git a/Plan/common/src/main/java/com/djrapitops/plan/db/sql/tables/ExtensionProviderTable.java b/Plan/common/src/main/java/com/djrapitops/plan/db/sql/tables/ExtensionProviderTable.java index a9a1c6623..9e2abff91 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/db/sql/tables/ExtensionProviderTable.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/db/sql/tables/ExtensionProviderTable.java @@ -50,9 +50,9 @@ public class ExtensionProviderTable { 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 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 + "=?" + - 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 { statement.setString(parameterIndex, providerName); diff --git a/Plan/common/src/main/java/com/djrapitops/plan/db/sql/tables/ExtensionTabTable.java b/Plan/common/src/main/java/com/djrapitops/plan/db/sql/tables/ExtensionTabTable.java index 6bcef7a77..918b9b998 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/db/sql/tables/ExtensionTabTable.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/db/sql/tables/ExtensionTabTable.java @@ -43,10 +43,10 @@ public class ExtensionTabTable { public static final String PLUGIN_ID = "plugin_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 + 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 { statement.setString(parameterIndex, tabName);