You have to bracket the clauses of the OR condition:
SELECT *
FROM rwb_bk_schedule s
INNER JOIN rwb_bk_rooms r
ON s.room_id = r.room_id
WHERE s.room_status=1
AND r.room_name=$room
AND (start_date BETWEEN $sdate AND edate OR end_date BETWEEN sdate AND $edate)
smantscheff
Nearly a Posting Virtuoso
1,233 posts since Oct 2010
Reputation Points: 300
Solved Threads: 254