From a069d7ab59a17d38c7caab011c30510a1665e786 Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Wed, 1 Mar 2017 02:43:44 -0500 Subject: [PATCH] Remove unnecessary INNER JOIN in sql to load a home server id --- .../src/mineplex/core/bonuses/BonusRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java index 9af91a078..2d882fd72 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java @@ -68,7 +68,7 @@ public class BonusRepository extends RepositoryBase { try (Connection connection = getConnection()) { - PreparedStatement s = connection.prepareStatement("SELECT cs.id FROM accountClan INNER JOIN clans ON clans.id = accountClan.clanId INNER JOIN clanServer AS cs ON clans.serverId = cs.id WHERE accountClan.accountId = " + accountId + ";"); + PreparedStatement s = connection.prepareStatement("SELECT clans.serverId FROM accountClan INNER JOIN clans ON clans.id = accountClan.clanId WHERE accountClan.accountId = " + accountId + ";"); ResultSet rs = s.executeQuery(); boolean hasRow = rs.next(); if (hasRow)