Hi,
The below query works in so far that it returns the expected results except that it returns the same results twice,

I cant see where I have went wrong with the query, can you?

Thanks
Chris


Code MySQL:
SELECT 
prices.single_f
, prices.return_f
, prices.vehicle
, resort.company_id
, resort.resort
, cars.type
, cars.description
, cars.long_description
, cars.image
, surcharges.type
, surcharges.adult
, surcharges.kids
, prices.timefrom
, prices.timeto
, prices.resort_id
, cars.min
, cars.max
, cars.shuttle
, company.is_enabled
, cars.shuttle
FROM prices
INNER JOIN resort ON resort.id = prices.resort_id
AND resort.resort = 'Amarilla Golf'
INNER JOIN company ON company.airports_served = resort.airport_id
INNER JOIN cars ON cars.type = prices.vehicle
LEFT JOIN surcharges ON surcharges.resort_id = prices.resort_id
WHERE prices.break <= '146'
AND company.is_enabled = 'Yes'
AND (
(
prices.timefrom <= prices.timeto
AND prices.timefrom <= '17:00:00'
AND prices.timeto >= '17:00:00'
)
OR (
prices.timefrom >= prices.timeto
AND prices.timefrom <= '17:00:00'
AND '23:59:59' >= '17:00:00'
)
OR (
prices.timefrom >= prices.timeto
AND '00:00:00' <= '17:00:00'
AND prices.timeto >= '17:00:00'
)
)