The SELECT statement uses the values provided in the Route form as query parameter values. The query returns the routes that fit the selection criteria and optionally includes an OR clause for return journeys.
The queries that return the route result set are:
SELECT route.rt_airline, airline.al_iatacode,
airline.al_name, route.rt_flight_num,
route.rt_depart_from, route.rt_arrive_to,
route.rt_depart_at, route.rt_arrive_at,
route.rt_arrive_offset, route.rt_flight_day
FROM route, airline
WHERE ((rt_depart_from = ? AND route.rt_arrive_to = ?))
AND route.rt_flight_day LIKE ? AND
route.rt_airline = airline.al_icaocode
ORDER BY route.rt_airline, route.rt_depart_from,
route.rt_flight_num
SELECT route.rt_airline, airline.al_iatacode,
airline.al_name, route.rt_flight_num,
route.rt_depart_from, route.rt_arrive_to,
route.rt_depart_at, route.rt_arrive_at,
route.rt_arrive_offset, route.rt_flight_day
FROM route, airline
WHERE ((rt_depart_from = ? AND route.rt_arrive_to = ?)
OR (route.rt_depart_from = ?
AND route.rt_arrive_to = ?))
AND route.rt_flight_day LIKE ?
AND route.rt_airline = airline.al_icaocode
ORDER BY route.rt_airline, route.rt_depart_from,
route.rt_flight_num