hi,
the data values are prices for apartment rentals - could be anything like '1000' or '850' etc...
I would like the user to be able to enter a range - retreive every row where the price values are between a certain range.
so they could enter 850 to 1000 (where $850 would be the lowrange and $1000 would be the highrange) the search would then display all results in between those figures - like every instance of $900 or $950 etc.,
here are the column types that i'm using in Mysql
pricef2 int(10) default NULL,
pricet2 int(10) default NULL,
here's the html form code that allows the user to enter a value:
Price from: $<input type=text name="lowrange" size=4 maxlength=5 value="">
Price to: $<input type=text name="highrange" size=4 maxlength=5 value="">
and finally, here's the php code that should select these ranges from the mysql table:
$result2 = mysql_query ("SELECT * FROM table
WHERE avail='1' && pricef2 >= $lowrange
&& pricet2 <= $highrange order by timestamp desc ");
thanks for your help..