Hi,
Hope you guys can help, I have a query which is working just fine -
SELECT r.ResortID,
s.ToSellAcceptPrice,
r.ResortName,
b.BedroomType,
w.WeekNumber,
c.ResortCountry
FROM T_ToSellInventory AS s,
T_Resort AS r,
T_Bedroom AS b,
T_Week AS w,
T_Country AS c
WHERE r.ResortID = s.ToSellResortID
AND r.ResortName LIKE '%$resort_name%'
AND b.ID = s.ToSellBedroomID
AND w.ID = s.ToSellWeekID
AND c.ID = r.ResortCountryID
ORDER BY ResortName
it's to search a database of timeshares.
But I also want to look up in a table called T_Resort_Info to see if the resort(s) found in T_Resort has any extra info. Some resorts do, some do not.
I have tried just adding it on the query above using AND on a RelatedResortID in the T_Resort_Info table but then if there isn't an entry for it, nothing is returned at all.
Basically I want the results returned whether there is an entry in T_Resort_Info or not for the resort(s). I am currently using a nested query which I'm sure there is a better way because it slows it down quite a bit!
Thanks in advance for any help, hope I've made myself clear.
Best Regards,
Ian Donovan