here’s my php MySQL syntax
$query_cruises = "SELECT * FROM cruises, fares WHERE cruises.id = fares.cruise_id AND cruises.offer = 'Y' GROUP BY cruises.code ORDER BY fares.offer ASC";
What’s happening is the recordset doesn’t sort by fares.offer. It lists one record (correct) but not in the price order (should show the lowest value from fares.offer)
So what I have is two tables, cruises and fares.
The cruises table has all the cruise info, the fares table has a list of prices for each cabin on that cruise, related to each other by cruises.id and fares.cruise_id
So I join the tables, no problem, but I want to one record which contains the cruise title, description and the lowest fare from the fares table.
The recordset would read something like
Cruise round the UK, from only £329
Hope this makes sense on what I’m trying to acheive !
Ta
Rich 🙂
1 Answer