Ok..This is prolly a really simple question but I am pretty new to the php/mysql thing so here goes.
I want to be able to search a database by room type and room capacity. The database is structured so that the columns are Theatre_cap Conference_cap and soo on...because each room has different capacities for different set ups...and some rooms cannont be set up in some of the styles soo i would leave that cap as 0...such as a lecture hall couldnt be set up for a dinner soo dinner_cap would be 0.
My question is.. I want to allow people to tell me what type of room that want to have and how many people they plan to have and return a list of rooms that fit the bill...This is what i got soo far...
mysql_select_db("special events");
$query = "select * from rooms where ".$style."cap <> 0 and ".$style."cap >= ".$attend;
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo "<p>Number of rooms found: ".$num_results."</p>";
blah blah blah...
soo...this works soo far...the problem is that the way I have it set up i want to allow them to chose a range of people in a jump menu...this is what that menu looks like soo far
<select name="attend">
<option selected value= "1">Less then 20</option>
<option value= "20">20 - 50</option>
<option value= "51">51 - 100</option>
<option value= "101">101 - 150</option>
<option value= "151">151 - 200</option>
<option value= "201">More then 200</option>
</select>
The problem is attend only has one value and right now it just checks to see if its greater then that value but i cant think of a good way to have it check it its lower then the higher constraint....
I know thats alot of infor for a simple problem..but any help would be great...
You can see the files as they are up at http://www.whatmattersrit.org/rit/events/new/request/index.html
and
http://www.whatmattersrit.org/rit/events/new/request/rooms.php