private void updateRankings() {
        if (lastRBRanking > 0) {
            if (rbRankings != null) {
                rbRankings.clear();
            }
            if (rbRankingsByName != null) {
                rbRankingsByName.clear();
            }
        }
        Connection con = DatabaseConnection.getConnection();
        lastRBRanking = System.currentTimeMillis();
        PreparedStatement ps = null;
        ResultSet rs = null;
        try {
            ps = con.prepareStatement("SELECT c.name, c.msi, c.level, c.reborns, c.jobrank, c.rank, c.clan AS clan FROM characters AS c LEFT JOIN accounts AS a ON c.accountid = a.id WHERE c.reborns > 10 AND a.gm < 3 AND a.banned < 1 ORDER BY c.rank ASC");
            rs = ps.executeQuery();
            while (rs.next()) {
                int clan = rs.getByte("clan");
                int rank = rs.getInt("rank");
                int clanrank = rs.getInt("jobrank");
                RBRankingInfo rbrankk = new RBRankingInfo(
                        rs.getString("name"),
                        rs.getByte("clan"),
                        rs.getInt("reborns"),
                        rs.getInt("level"),
                        rs.getInt("msi"),
                        rank,
                        clanrank);
                rbRankings.put(rs.getRow(), rbrankk);
                rbRankingsByName.put(rs.getString("name"), rbrankk);               
            }
            rs.close();
            ps.close();
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (rs != null) {
                    rs.close();
                }
                if (ps != null) {
                    rs.close();
                }
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
        }
    }