Hello , I am doing a project on Resort Website where I have a module of Room Reservation. I want a code for checking the availability of rooms when user selects arrival date and departure date and clicks check button.

database
room_details table
------------------
roomno
type
rate_regular
rate_delux
rate_suite
--------------------

room table
----------
roomno
custid
check_in_date
check_out_date
no_of_room
no_of_members
room_type
room_status

Hello , I am doing a project on Resort Website where I have a module of Room Reservation. I want a code for checking the availability of rooms when user selects arrival date and departure date and clicks check button.

database
room_details table
------------------
roomno
type
rate_regular
rate_delux
rate_suite
--------------------

room table
----------
roomno
custid
check_in_date
check_out_date
no_of_room
no_of_members
room_type
room_status

Try this out

select rt.roomno from room rt, room_details rd where rt.roomno-rd.roomno and (Format([rt.check_in_date], 'MM/dd/yyyy')) not between 'Selectdate' and 'Selectdate' and (Format([rt.check_out_date], 'MM/dd/yyyy')) not between 'Selectdate' and 'Selectdate'

'SelectDate will be the date selected by the user....
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.