Ppl
HELP,
I am trying to write a query to select the number of roommates that can occupy a room based on the max capacity example Some room will allow 4 Max another 4 or less another 3 max another 3 or less another 2 max or 2 or less. I am so tangled up in this I can't work my way back up. Please help!
Any help is much needed and appreciated.
<cfquery name="pull_rooms" datasource="#DSN#">
SELECT DISTINCT Room_TypeID, Room_Name, RoomServicesChg
FROM tlbHotelRoomTypes
WHERE Cost > 0
<cfif Number_of_Roommates 4>
AND Capacity <= 4
</cfif>
</cfquery>
Output query
<CFOUTPUT QUERY="pull_rooms" group="room_typeID">
<cfif ((#FORM.roommate_option# IS 'no_roommate_full_payment') AND (Room_TypeID IS "F102" OR Room_TypeID IS "708" OR Room_TypeID IS "4" OR Room_TypeID IS "3" OR Room_TypeID IS "4" OR Room_TypeID IS "3"))
OR (
(room_typeID IS "R")
OR (room_typeID IS "A")
OR (room_typeID IS "AA")
OR (room_typeID IS "B")
OR (room_typeID IS "C")
OR (room_typeID IS "D1")
OR (room_typeID IS "D6")
OR (room_typeID IS "D7")
OR (room_typeID IS "D8")
OR (room_typeID IS "D9")
OR (room_typeID IS "E")
OR (room_typeID IS "F")
OR (room_typeID IS "H")
OR (room_typeID IS "I")
</cfoutput>
