Results 1 to 4 of 4
Jun 28, 2000, 09:38 #1
- Join Date
- Jun 2000
- Cork, Ireland
- 0 Post(s)
- 0 Thread(s)
I have one table(Flights) which holds a FlightID, DepartFrom, and ArriveAt fields, there all ints. The fields DepartFrom and ArriveAt contain AirportID's.
Another table holds the airports. This table has an AirportID and and Airport field, the
the AirportID is an int and the Airport holds the name of the Airport.
I want to select the Aiports which are referred to by the DepartFrom and ArriveAt Fields in one query. Here is my bad attempt at doing it in one query.
SELECT Airport, Airport
FROM Flights, Airports
Where DepartFrom=AirportID and
How do I pick up the other airport in the same query, since they both have the field name SQL gives an error to my query.
At the moment I'm using 2 query's and running them through a while loop together to output to my page. There has got to be an easier way of doing this.
By the way I'm using PHP4 and MySQL.
Help me please......