Unanswered: combine operators OR subselect AND temporary table
i have a tab for hotels, specifying location and other specs, such as whether they have a pool or a restaurant etc.
i want to avoid that searches have few or no results.
Thus i prefer OR in the "specs" part of the query:
WHERE pool= 1 OR restaurant= 1 etc.
Using AND would only give me hotels that have a pool AND
a restaurant. OR gives me all hotels that have EITHER pool or restaurant.
I get stuck at the location part of the query.
I want ONLY hotels of the choosen location to appear in the result.
When i use ..
SELECT * FROM hotels WHERE location = 3 AND pool = 1 OR restaurant = 1.
.. i am unable to keep operators APART..
OR at the end ALSO gives me hotels that are at location 2,
AND operator forces ALL result hotels to have a pool.
Is there a kind of bracket system to control the behavior of operators ?
MUST i learn subselects, temp tables now ?