Remove unnecessary INNER JOIN in sql to load a home server id
This commit is contained in:
parent
721dd5a29a
commit
a069d7ab59
@ -68,7 +68,7 @@ public class BonusRepository extends RepositoryBase
|
|||||||
{
|
{
|
||||||
try (Connection connection = getConnection())
|
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();
|
ResultSet rs = s.executeQuery();
|
||||||
boolean hasRow = rs.next();
|
boolean hasRow = rs.next();
|
||||||
if (hasRow)
|
if (hasRow)
|
||||||
|
Loading…
Reference in New Issue
Block a user