This may give you somwhere to start
create a database
create tables:
rooms - room#,type ...
bookings - id,room#,startdate,enddate
=====Pseudo sql code======
select room# from bookings b, rooms r where
r.type = $type_requested
and b.startdate < $startdate_requested
and b.enddate < $enddate_requested
and b.room# = r.room#
=====End Pseudo SQL=========
Good Luck