i am doing a site for a hotel and i need to check to see if a room is already booked or not when a new guset wants to book a room
what i have:-
A "bookings" table which holds arrive date & depart date along with the room_id they have booked ect ... And a table for "room_info" which hold info about the room whether it is on suite & what bed it has in it i.e. single, double, twin ect...
the new guest will choose whether they want on-suite or not, and what bed they want and then they will enter a arrival date and a depart date and post that from a form.
this is what i have in the SQL:-
SELECT *
FROM room_info, bookings
WHERE room_info.on_suite = 'onsuite'
AND room_info.bed = 'beds'
AND bookings.adate <= 'adate1'
AND bookings.ddate >= 'ddate1'
when i run this it comes back with no data.
if anyone could help me with this you would prevent serious damage to my head and monitor.