Skip to content

Commit

Permalink
fix bans? (pray)
Browse files Browse the repository at this point in the history
  • Loading branch information
GodCipher committed Oct 2, 2023
1 parent f6450c5 commit 9df1664
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public DatabaseResult<List<Integer>> getBansForCategory(int categoryId) {
try(Connection connection = DATA_SOURCE.getConnection()) {
try (PreparedStatement preparedStatement = connection.prepareStatement(
"SELECT champId FROM BannedChamps WHERE matchId IN " +
"(SELECT DISTINCT matchId FROM ChampInfo WHERE categoryId = ?)")) {
"(SELECT matchId FROM ChampInfo WHERE categoryId = ?)")) {
preparedStatement.setInt(1, categoryId);
ResultSet resultSet = preparedStatement.executeQuery();
List<Integer> bans = new ArrayList<>();
Expand All @@ -427,7 +427,7 @@ public DatabaseResult<List<Integer>> getBansForCategoryOnMap(int categoryId, int
try(Connection connection = DATA_SOURCE.getConnection()) {
try (PreparedStatement preparedStatement = connection.prepareStatement(
"SELECT champId FROM BannedChamps WHERE matchId IN " +
"(SELECT DISTINCT matchId FROM ChampInfo WHERE categoryId = ?) AND matchId IN " +
"(SELECT matchId FROM ChampInfo WHERE categoryId = ?) AND matchId IN " +
"(SELECT DISTINCT matchId FROM GameInfo WHERE mapId = ?)")) {
preparedStatement.setInt(1, categoryId);
preparedStatement.setInt(2, mapId);
Expand Down

0 comments on commit 9df1664

Please sign in to comment.