public static boolean checkMatchName(Match match, boolean isNew) {
        boolean res = false;
        try {
            PreparedStatement pr = connection.prepareStatement("" +
                    "SELECT match_id FROM match\n" +
                    "WHERE UPPER(match_name) = UPPER(?)");
            pr.setString(1, match.getMatchName());
            ResultSet rs = pr.executeQuery();
            if (rs.next()) {
                if (!isNew) {
                    int newMatchID = rs.getInt(1);
                    if (newMatchID != match.getMatchID()) {
                        res = true;
                    }
                }else {
                    res = true;
                }
            }
            rs.close();
            pr.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return res;
    }