There are many entries in the 'search' table
Table - 'search'
Table data - holiday details, hotel, price
In the list, I must only have two of the same hotel.
The other search criteria is that the list must be in price order.
If i do the following sql statement
select distinct hotel
from search
and then loop through the hotels and run the next sql statement
select *
from search
where hotel = (above hotelid)
limit 2
I will get 2 entries in the search table for each hotel
the problem is that the list might not be in price order
Does anybody know how to get around this?
Two hotels for the list
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Two hotels for the list
Use ORDER BY price