SELECT * FROM itinerary_media WHERE itineraryID = ORDER BY itineraryMediaPosition;

Неправильный запрос