Click to See Complete Forum and Search --> : Finding the lowest value (in this instance - price)


kessa
05-12-2006, 06:25 AM
Hi All,

I currently have a feature which allows people to provide some prices for holiday homes on our website.

At the moment I have a "pricesfrom" field, in addition to several other prices which they can specify for different times of year (low, mid, high, seasons, etc).

Unfortunately, when people change prices for each season, they don't always remember to change the "pricesfrom" field.

As a result I wondered if I could automate the process so that instead of the user having to manually update a "pricesfrom" field, I could instruct the .asp to look at what pricing info has been entered for each property, and then calculates which is the lowest price.

(The price is entered as a text field and so may or may not include a decimal point.) - that said, I think it's set as currency in the database.

Any ideas on how I may be able to do this?

Cheers
Kessa

lmf232s
05-12-2006, 04:04 PM
MIN function MIGHT do the trick.

Select Min(Price) From Table