1 out of 3 search fields works
hi,
only search element that works is a select list menu, the other 2 which 1 is a date range does not work, php code generated by data assist:
<?php
//WA Database Search Include
require_once("WADbSearch/HelperPHP.php");
?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: WADApipeline;
//Searchpage: product_Results.php;
//Form: form1;
$WADbSearch1_DefaultWhere = "";
if (!session_id()) session_start();
if ((isset($_POST["WADbSearch1"])) && ($_POST["WADbSearch1"] != "")) {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations
$KeyArr0 = array("ClientLastName");
$KeyArr1 = array("Product");
//comparison list additions
$WADbSearch1->addComparisonFromEdit("DueDate","FromDate","AND",">=",2);
$WADbSearch1->addComparison("DueDate","".WAQB_getEndDate($_POST["ToDate"]) ."","AND","<=",2);
$WADbSearch1->keywordComparison($KeyArr0,"".((isset($_POST["ClientLastName"]))?$_POST["ClientLastName"]:"") ."","AND","Includes",",%20","%20","%22","%22",0);
$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_POST["Product"]))?$_POST["Product"]:"") ."","AND","Includes",",%20","%20","%22","%22",0);
//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_product_Results"]=$WADbSearch1->whereClause;
}
}
else {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//get the filter definition from a session variable
if (1 == 1) {
if (isset($_SESSION["WADbSearch1_product_Results"]) && $_SESSION["WADbSearch1_product_Results"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_product_Results"];
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';
?>
my form:
<form name="form1" action="product_Results.php" method="post">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td align="right"><label >Due Date Range From:</label></td>
<td><input type="text" name="FromDate" value="" />
<label>To:</label>
<input type="text" name="ToDate" value="" />
(mm/dd/yyyy)</td>
</tr>
<tr>
<td align="right"><label for="ClientLastName">Client Last Name:</label></td>
<td><input type="text" name="ClientLastName" value="" /></td>
</tr>
<tr>
<td align="right"><label for="Product">Product:</label></td>
<td><select name="Product">
<option value="product1">product1</option>
<option value="product2">product2</option>
</select></td>
</tr>
<tr>
<td align="center" ><input type="submit" name="WADbSearch1" value="Search" /></td>
</tr>
</table>
</form>
my search form is on my results page.
tried deleting the behaviour and going through the wizard again but still no joy.
thanks