additional sql query fix

This commit is contained in:
Peda 2020-12-29 12:50:25 +01:00
parent 42c43c41b6
commit 32f5619fe9

View File

@ -31,7 +31,7 @@ public class PlayerWrapper {
try { try {
PreparedStatement ps = util.prepareStatement("CREATE TABLE IF NOT EXISTS " + uuidTableName + PreparedStatement ps = util.prepareStatement("CREATE TABLE IF NOT EXISTS " + uuidTableName +
" ( `uuid` VARCHAR(36) NOT NULL , `name` VARCHAR(36) NOT NULL , " + " ( `uuid` VARCHAR(36) NOT NULL , `name` VARCHAR(36) NOT NULL , " +
" PRIMARY KEY (`uuid`))"); " PRIMARY KEY (`name`))");
util.executeUpdate(ps); util.executeUpdate(ps);
} catch (SQLException e) { } catch (SQLException e) {
@ -63,7 +63,7 @@ public class PlayerWrapper {
String uuidTableName = PluginConfig.getUUIDTableName(); String uuidTableName = PluginConfig.getUUIDTableName();
try { try {
PreparedStatement ps = util.prepareStatement("SELECT * FROM " + uuidTableName + " WHERE player=?"); PreparedStatement ps = util.prepareStatement("SELECT * FROM " + uuidTableName + " WHERE name=?");
ps.setString(1, name); ps.setString(1, name);
ResultSet rs = util.executeQuery(ps); ResultSet rs = util.executeQuery(ps);