I think you want:

"SELECT * FROM routes, users WHERE area='$area' AND style='$style'
AND rating BETWEEN '[$rating1]' AND '[$rating2]' GROUP BY route
 ORDER BY rating ASC ";

>From http://dev.mysql.com/doc/mysql/en/Comparison_Operators.html
"expr BETWEEN min AND max
If expr is greater than or equal to min and expr is less than or equal to
max, BETWEEN returns 1, otherwise it returns 0. This is equivalent to the
expression (min <= expr AND expr <= max) if all the arguments are of the
same type. Otherwise type conversion takes place according to the rules
described at the beginning of this section, but applied to all the three
arguments. Note: Before MySQL 4.0.5, arguments were converted to the type of
expr instead."

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to