Gossamer Forum
Home : Products : DBMan : Customization :

Re: Duplicate adds

Quote Reply
Re: Duplicate adds In reply to
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. Smile

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





Subject Author Views Date
Thread Duplicate adds handmade 2167 Sep 25, 1999, 8:57 AM
Post Re: Duplicate adds
JPDeni 2102 Sep 24, 1999, 9:27 PM
Post Re: Duplicate adds
handmade 2093 Sep 25, 1999, 8:00 PM
Post Re: Duplicate adds
JPDeni 2098 Sep 25, 1999, 8:28 PM
Post Re: Duplicate adds
JPDeni 2089 Sep 25, 1999, 9:04 PM
Post Re: Duplicate adds
handmade 2100 Sep 26, 1999, 12:54 AM
Post Re: Duplicate adds
handmade 2086 Sep 26, 1999, 9:07 PM
Post Re: Duplicate adds
handmade 2105 Sep 27, 1999, 12:09 AM
Post Re: Duplicate adds
JPDeni 2093 Sep 27, 1999, 5:48 AM
Post Re: Duplicate adds
handmade 2116 Sep 27, 1999, 7:06 AM
Post Re: Duplicate adds
JPDeni 2088 Sep 27, 1999, 7:31 AM