
January 18th, 2013, 06:39 AM
|
|
Registered User
|
|
Join Date: Feb 2012
Posts: 11
Time spent in forums: 2 h 46 m 51 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by r937 change this --
Code:
FROM rooms
LEFT
JOIN bookings
ON bookings.roomno = rooms.roomno
AND bookings.hotel_id = rooms.hotel_id
AND bookings.status <> 1
WHERE rooms.hotel_id = 1 and the_date is null or the_date='2013-01-10'
ORDER
BY rooms.roomno
to this --
Code:
FROM rooms
LEFT
JOIN bookings
ON bookings.roomno = rooms.roomno
AND bookings.hotel_id = rooms.hotel_id
AND bookings.status <> 1
and the_date='2013-01-10'
WHERE rooms.hotel_id = 1
ORDER
BY rooms.roomno
|
Thanks so much Rudy
You are God sent...........It is working the way i want it now.
|