public int[] GetPlayerData(String name) {
    	Connection con = null;
    	PreparedStatement pst = null;
    	ResultSet rs = null;
    	int[] r = {0, 0};
    	boolean exist = false;
    	try {
    		con = DriverManager.getConnection(url, user, password);
    		pst = con.prepareStatement("SELECT * FROM Players WHERE Name = ?");
    		pst.setString(1, name);
    		rs = pst.executeQuery();
    		exist = rs.next();
    		//Check if player exists
    		if (!exist) {
    			SetNewPlayerData(name);
    			r[0] = 500;
    			r[1] = 0;
    			System.out.println("New player " + Integer.toString(r[0]) + " " + Integer.toString(r[1]));
    			return r;
    		} else {
    			r[0] = rs.getInt("Gold");
    			r[1] = rs.getInt("Bet");
    			System.out.println(name + " " + Integer.toString(r[0]) + " " + Integer.toString(r[1]));
    			return r;
    		}
    	} catch (SQLException ex) {
    		Logger lgr = Logger.getLogger(MySQLAccess.class.getName());
            lgr.log(Level.SEVERE, ex.getMessage(), ex);
            return null;
    	}
    	finally {
            try {
                if (pst != null) {
                    pst.close();
                }
                if (con != null) {
                    con.close();
                }
            } catch (SQLException ex) {
                Logger lgr = Logger.getLogger(MySQLAccess.class.getName());
                lgr.log(Level.SEVERE, ex.getMessage(), ex);
            }
        }
    }