public ArrayList<Booking> bookingSearch(String type, String param) throws Exception {
		
		Connection conn = DBConnection.getConnection();
		
		String sqlStr = "";
		
		if (type.equals("fsFilter-flightNum")) {
			sqlStr = "select * from booking b, aircraft a, flightschedule fs, payment p, passenger pa where b.fsID = fs.fsID and fs.aircraftID = a.aircraftID and b.paymentID = p.paymentID and b.passengerID = pa.passengerID and a.flightNum=?";
		} else if (type.equals("fsFilter-departCode")) {
			sqlStr = "select * from booking b, flightschedule fs, payment p, passenger pa where b.fsID = fs.fsID and b.paymentID = p.paymentID and b.passengerID = pa.passengerID and fs.departCode=?";
		} else if (type.equals("fsFilter-arriveCode")) {
			sqlStr = "select * from booking b, flightschedule fs, payment p, passenger pa where b.fsID = fs.fsID and b.paymentID = p.paymentID and b.passengerID = pa.passengerID and fs.arriveCode=?";
		} else {
			sqlStr = "select * from booking b, flightschedule fs, payment p, passenger pa where b.fsID = fs.fsID and b.paymentID = p.paymentID and b.passengerID = pa.passengerID";
		}
		PreparedStatement pstmt = conn.prepareStatement(sqlStr);
		
		if (type.equals("fsFilter-flightNum") || type.equals("fsFilter-departCode") || type.equals("fsFilter-arriveCode")) {
			pstmt.setString(1, param);
		}
		ResultSet rs = pstmt.executeQuery();
		
		if (rs.isBeforeFirst()) {
			
			ArrayList<Booking> alBooking = new ArrayList<Booking>();
			
			while (rs.next()) {
				
				int bookingID = rs.getInt("bookingID");
				int fsID = rs.getInt("fsID");
				int paymentID = rs.getInt("paymentID");
				String custTitle = rs.getString("title");
				String custFirstName = rs.getString("firstName");
				String custLastName = rs.getString("lastName");
				String custEmail = rs.getString("email");
				String custPhone = rs.getString("phone");
				int economy = rs.getInt("economy");
				int business = rs.getInt("business");
				int first = rs.getInt("first");
				int child = rs.getInt("child");
				
				String depart = rs.getString("depart");
				String departCode = rs.getString("departCode");
				String departCity = rs.getString("departCity");
				String departCountry = rs.getString("departCountry");
				String arrive = rs.getString("arrive");
				String arriveCode = rs.getString("arriveCode");
				String arriveCity = rs.getString("arriveCity");
				String arriveCountry = rs.getString("arriveCountry");
				double economyCost = rs.getDouble("economyCost");
				double businessCost = rs.getDouble("businessCost");
				double firstCost = rs.getDouble("firstCost");
				
				String cardType = rs.getString("cardType");
				String cardNo = rs.getString("cardNo");
				String cardExpiry = rs.getString("cardExpiry");
				
				alBooking.add(new Booking(bookingID, fsID, paymentID, custTitle, custFirstName, custLastName, custEmail, custPhone, economy, business, first, child, depart, departCode, departCity, departCountry, arrive, arriveCode, arriveCity, arriveCountry, economyCost, businessCost, firstCost, cardType, cardNo, cardExpiry));
				
			}
			
			conn.close();
			return alBooking;
			
		} else {
			
			conn.close();
			return null;
			
		}
		
	}