From 7e16be7f9e6ab4ab97ee107e61a8aac29a9c45cb Mon Sep 17 00:00:00 2001 From: Xephi Date: Fri, 5 Sep 2014 19:41:20 +0200 Subject: [PATCH] lower ... not lowest... need to sleep T.T --- src/main/java/fr/xephi/authme/datasource/MySQLThread.java | 4 ++-- src/main/java/fr/xephi/authme/datasource/SQLiteThread.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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()) {