min_age = params[:min_age]
max_age = params[:max_age]
@users = User.find(:all, :conditions => [" years >= ? AND years <= ? ", min_age, max_age])
This is the controller method for a search feature. As you can see I wish to search by age range. This works for all max_age values up to 99, but when the max_age exceeds 99 the search returns no results when it should. I don't really expect many people beyond 99 but I am curious why this is happening. The age is a string.