Craig Hoffman wrote:
This should pull up all the rock climbs that are in Yosemite, that are traditional style and are between the rating 5.5 to 5.10c. Here is my query:
"SELECT * FROM routes, users WHERE area='$area' AND style='$style' BETWEEN rating='[$rating1]' AND rating='[$rating2]' GROUP BY route ORDER BY rating ASC ";
Not sure what those square brackets are doing there, but your main problem is that MySQL has no way of knowing what order you think those rating strings should be in. The string '5.5' is greater than '5.10c', and the number 5.5 is greater than 5.10. I think you're going to need to change the way you represent the ratings -- maybe something like '5.05' and '5.10c' would work (depending on what other possibilities are, and how the letters are supposed to affect sorting). Then manipulate the strings to produce what you're used to when it comes time to display them (that, or have two columns: one for display and one for sorting).
-- Keith Ivey <[EMAIL PROTECTED]> Washington, DC
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]