diff --git a/src/main/java/fr/xephi/authme/datasource/MySQLThread.java b/src/main/java/fr/xephi/authme/datasource/MySQLThread.java index cb8b8743..e1cce2e6 100644 --- a/src/main/java/fr/xephi/authme/datasource/MySQLThread.java +++ b/src/main/java/fr/xephi/authme/datasource/MySQLThread.java @@ -171,7 +171,7 @@ public class MySQLThread extends Thread implements DataSource { ResultSet rs = null; try { con = makeSureConnectionIsReady(); - pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE LOWEST(" + columnName + ")=LOWEST(?);"); + pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE LOWER(" + columnName + ")=LOWER(?);"); pst.setString(1, user); rs = pst.executeQuery(); return rs.next(); @@ -197,7 +197,7 @@ public class MySQLThread extends Thread implements DataSource { int id = -1; try { con = makeSureConnectionIsReady(); - pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE LOWEST(" + columnName + ")=LOWEST(?);"); + pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE LOWER(" + columnName + ")=LOWER(?);"); pst.setString(1, user); rs = pst.executeQuery(); if (rs.next()) { diff --git a/src/main/java/fr/xephi/authme/datasource/SQLiteThread.java b/src/main/java/fr/xephi/authme/datasource/SQLiteThread.java index 7ab8ffa4..e846e1d6 100644 --- a/src/main/java/fr/xephi/authme/datasource/SQLiteThread.java +++ b/src/main/java/fr/xephi/authme/datasource/SQLiteThread.java @@ -131,7 +131,7 @@ public class SQLiteThread extends Thread implements DataSource { PreparedStatement pst = null; ResultSet rs = null; try { - pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE LOWEST(" + columnName + ")=LOWEST(?);"); + pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE LOWER(" + columnName + ")=LOWER(?);"); pst.setString(1, user); rs = pst.executeQuery(); return rs.next(); @@ -149,7 +149,7 @@ public class SQLiteThread extends Thread implements DataSource { PreparedStatement pst = null; ResultSet rs = null; try { - pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE LOWEST(" + columnName + ")=LOWEST(?);"); + pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE LOWER(" + columnName + ")=LOWER(?);"); pst.setString(1, user); rs = pst.executeQuery(); if (rs.next()) {