The code to strip characters from the fields would go in sub add_record, just before
$status = &validate_record;
I really need to make a mod for the range searches.
I'm assuming that your field name is Price. If it's different, you'll need to change every instance of Price below.
Set up your select field as follows:
<OPTION value="*">All Prices
<OPTION value="0-250001">Up to 250 000
<OPTION value="249999-500001">250 000 - 500 000
<OPTION value="499999-1000001">500 000 - 1 000 000
<OPTION value="999999">1 000 000+
</SELECT>
In db.cgi, sub query, just after
local (%sortby);
add
unless ($in{'Price'} eq "*") {
($in{'Price-gt'},$in{'Price-lt'}) = split (/-/,$in{'Price'});
$in{'Price'} = '';
}
}
This will give you inclusive search ranges.
------------------
JPD
$status = &validate_record;
I really need to make a mod for the range searches.

I'm assuming that your field name is Price. If it's different, you'll need to change every instance of Price below.
Set up your select field as follows:
Code:
<SELECT NAME="Price"> <OPTION value="*">All Prices
<OPTION value="0-250001">Up to 250 000
<OPTION value="249999-500001">250 000 - 500 000
<OPTION value="499999-1000001">500 000 - 1 000 000
<OPTION value="999999">1 000 000+
</SELECT>
In db.cgi, sub query, just after
local (%sortby);
add
Code:
if ($in{'Price'}) { unless ($in{'Price'} eq "*") {
($in{'Price-gt'},$in{'Price-lt'}) = split (/-/,$in{'Price'});
$in{'Price'} = '';
}
}
This will give you inclusive search ranges.
------------------
JPD