Actually, that will just give you the nearest one less than your max. to round up or down, take the max MOD 25000, get the remainder, see if the remainer is greater than or less than half of your rounding number, so 125000, if less than, subtract the remainder from the max, if it is more, subtract the remainder from the max and add 25000. You might be able to trim that up some, but thats basically what I would try first.
On 4/5/06, Ryan Guill <[EMAIL PROTECTED]> wrote: > i have to admit, i didnt read your whole thing, but maybe this will work. > > take the max, MOD 25000 to get the remainder, and then subtract that > from the max... > > 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. > > > > <!----------------//------ > > andy matthews > > web developer > > ICGLink, Inc. > > [EMAIL PROTECTED] > > 615.370.1530 x737 > > --------------//---------> > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237046 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