Probable fix for clan_privs SQLSyntaxErrorException.
This commit is contained in:
@ -2021,14 +2021,13 @@ public class Clan implements IIdentifiable, INamable
|
||||
_privs.get(rank).setPrivs(privs);
|
||||
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("INSERT INTO clan_privs (clan_id,rank,party,privs) VALUES (?,?,?,?) ON DUPLICATE KEY UPDATE privs = ?"))
|
||||
PreparedStatement ps = con.prepareStatement("REPLACE INTO clan_privs (clan_id,rank,party,privs) VALUES (?,?,?,?)"))
|
||||
{
|
||||
// Retrieve all skills of this PlayerInstance from the database
|
||||
ps.setInt(1, _clanId);
|
||||
ps.setInt(2, rank);
|
||||
ps.setInt(3, 0);
|
||||
ps.setInt(4, privs);
|
||||
ps.setInt(5, privs);
|
||||
ps.execute();
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -2057,7 +2056,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
_privs.put(rank, new RankPrivs(rank, 0, privs));
|
||||
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("INSERT INTO clan_privs (clan_id,rank,party,privs) VALUES (?,?,?,?)"))
|
||||
PreparedStatement ps = con.prepareStatement("REPLACE INTO clan_privs (clan_id,rank,party,privs) VALUES (?,?,?,?)"))
|
||||
{
|
||||
// Retrieve all skills of this PlayerInstance from the database
|
||||
ps.setInt(1, _clanId);
|
||||
|
Reference in New Issue
Block a user