Thanks everyone. That should work!

<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 05, 2006 1:53 PM
To: CF-Talk
Subject: getting the closest number to an increment of 25,000


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.

<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237051
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to