public static List<Player> getPlayers(int gameid) throws SQLException {
        String sql = null;
        Connection connection = null;
        PreparedStatement query = null;
        ResultSet results = null;
        try {
            sql = "SELECT playerid, playername, points, notes, rolenotes, gameid from player where gameid = ? order by points, playername";
            connection = Database.getConnection();
            query = connection.prepareStatement(sql);
            query.setInt(1, gameid);
            results = query.executeQuery();

            Player player = null;
            List<Player> players = new ArrayList<Player>();
            while (results.next()) {
                try {
                    player = new Player();
                    player.setId(Integer.parseInt(results.getString("playerid")));
                    if (results.getString("points") != null) {
                        player.setPoints(Integer.parseInt(results.getString("points")));
                    }
                    player.setNotes(results.getString("notes"));
                    player.setName(results.getString("playername"));
                    player.setRolenotes(results.getString("rolenotes"));
                    player.setGameid(Integer.parseInt(results.getString("gameid")));

                    players.add(player);
                } catch (SQLException ex) {
                    Logger.getLogger(User.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            return players;
        } finally {
            try {
                results.close();
            } catch (Exception e) {
            }
            try {
                query.close();
            } catch (Exception e) {
            }
            try {
                connection.close();
            } catch (Exception e) {
            }
        }

    }