Oh. I think I may have it. Let's see.
When a person adds a record, he indicates the age range of people he would like to meet.
Then someone else comes to the site and does a search. This someone else is 18 years old and only wants to find people who are interested in meeting someone his age. Right?
The previous search allows the person to find someone he's interested in. What you're doing now will assure that the people he finds are also interested in him.
Okay. Let's say the field on your search form is called Age_range.
In sub query, you would add (just after the stuff for the other age thing)
$in{'agefrom-gt'} = $in{'Age_range'} + 1;
$in{'ageto-lt'} = $in{'Age_range'} - 1;
}
Make sure that you don't have a field in your .cfg file called "Age_range."
(I think this is correct. I get confused sometimes. )
------------------
JPD
When a person adds a record, he indicates the age range of people he would like to meet.
Then someone else comes to the site and does a search. This someone else is 18 years old and only wants to find people who are interested in meeting someone his age. Right?
The previous search allows the person to find someone he's interested in. What you're doing now will assure that the people he finds are also interested in him.
Okay. Let's say the field on your search form is called Age_range.
In sub query, you would add (just after the stuff for the other age thing)
Code:
if ($in{'Age_range'}) { $in{'agefrom-gt'} = $in{'Age_range'} + 1;
$in{'ageto-lt'} = $in{'Age_range'} - 1;
}
Make sure that you don't have a field in your .cfg file called "Age_range."
(I think this is correct. I get confused sometimes. )
------------------
JPD