#ceiling(price / 25,000) * 25000# should give you the next higher, or the same value if it's already aligned at a 25,000 border. Just reverse it fro the lower bound. You can also use round, if you actually want rounding, but that's not the case here.
cheers, barneyb On 4/5/06, Andy Matthews <[EMAIL PROTECTED]> wrote: > I'm working on a site for a realtor. It has a "search by price" feature with > a low and a high end. The realtor would like both dropdowns to start at the > closest increment of $25,000 in the database so that the user could > conceivably just hit the submit button and get results. Right now I'm > prepoulating them both at $25k, the minimum. > > Anyway, assuming the max price in the db was $269,000, I need the high > dropdown to max out at $275,000. If the minimum price was $111,000, the low > dropdown needs to min out at $100,000. > > Does anyone have suggestions on the best way to accomplish this? I know how > to get the min and max values from the db, just not sure how to "round" to > the nearest $25,000 mark. > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237044 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

