The query you were trying to run failed, the server gave the following reason:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY locations.title ASC' at line 12

SELECT locations.location_id, locations.title, locations.address, locations.tube, locations.time FROM links LEFT JOIN locations USING (location_id) WHERE links.tour_id = ORDER BY locations.title ASC