Hello all,
I have the following SQL statement.
SELECT a.airport_code AS AIRPORTCODE, a.airport_name AS AIRPORT, u.usr_id AS USERID, u.usr_fname AS FIRSTNAME, u.usr_lname AS LASTNAME, u.usr_email AS EMAIL,u.usr_airline AS AIRLINE, u.usr_airline_iatacode AS IATA, t.title AS TITLE
FROM users u LEFT JOIN userairportservices uas ON uas.usr_id_users = u.usr_id LEFT JOIN airport a ON a.airport_id = uas.airport_id_airport LEFT JOIN title t ON t.title_id = u.usr_title
WHERE a.airport_code= apcode
I want to sort by a.airport_name but every time I add ORDER BY a.airport_name ASC to the end of this query, it fails to load the page. Is there an issue with adding and ORDER BY to the end of this statement or should it go somewhere else in it?
Thanks
Dave