This commit is contained in:
parent
5d5e6a5cfb
commit
6298697169
@ -336,8 +336,8 @@ public class DatabaseManager
|
||||
|
||||
if(!isInTable(playerName)) return -1;
|
||||
|
||||
String query = "SELECT ? FROM players " +
|
||||
"WHERE player = ? " +
|
||||
String query = "SELECT %param% FROM players " +
|
||||
"WHERE player=? " +
|
||||
"LIMIT 1";
|
||||
|
||||
|
||||
@ -348,11 +348,12 @@ public class DatabaseManager
|
||||
String priorityStr = "";
|
||||
if(priority == 0) priorityStr = "main_pronoun_id";
|
||||
else if(priority == 1) priorityStr = "secondary_pronoun_id";
|
||||
query = query.replace("%param%", priorityStr);
|
||||
|
||||
try(PreparedStatement pStatement = dbConnection.prepareStatement(query)) {
|
||||
|
||||
pStatement.setString(1, priorityStr);
|
||||
pStatement.setString(2, playerName);
|
||||
pStatement.setString(1, playerName);
|
||||
|
||||
|
||||
ResultSet rSet = pStatement.executeQuery();
|
||||
if(rSet.isClosed()) return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user