where("hotel_id = $hotel_id and room_id = $room_id and start_date <= '$date' and end_date > '$date' and (status=1 or status=6) ")->sum('total_room_num'); return intval($res); } }