Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search criteria

Status
Not open for further replies.

jen0dorf

IS-IT--Management
Apr 15, 2008
104
GB
Hi

created a search sequence using WA products

with four search fields which are all "variable". With a lot of help etc I've sort of got it working apart from the search fails when certain search options are selected.

the code is below can anyone see where I've gone wrong?]

the combination that work or dont are:

search on price only I get no results

search on LOA only I get no results

search on berths only I get no results

search on LOA and Berths I get no results

search on price and berths I get no results

search on price and loa I get results

search on price, loa and berths I get results

thanks Ian


Code:

$WADbSearch1->addComparison("dt_Price","" . isset($_GET['S_dt_Price'])?($_GET['S_dt_Price'] -5000):$_GET['S_dt_Price'] . "","AND",">=",1); $WADbSearch1->addComparison("dt_Price","" . isset($_GET['S_dt_Price'])?($_GET['S_dt_Price'] +5000):$_GET['S_dt_Price'] . "","AND","<=",1);
$WADbSearch1->addComparison("dt_loa","" . isset($_GET['S_dt_loa'])?($_GET['S_dt_loa'] -10):$_GET['S_dt_loa'] . "","AND",">=",1); $WADbSearch1->addComparison("dt_loa","" . isset($_GET['S_dt_loa'])?($_GET['S_dt_loa'] +10):$_GET['S_dt_loa'] . "","AND","<=",1);
$WADbSearch1->addComparison("dt_berths","" . isset($_GET['S_dt_berths'])?($_GET['S_dt_berths'] -2):$_GET['S_dt_berths'] . "","AND",">=",1); $WADbSearch1->addComparison("dt_berths","" . isset($_GET['S_dt_berths'])?($_GET['S_dt_berths'] +2):$_GET['S_dt_berths'] . "","AND","<=",1);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top