the first error is happening due to code order again. Line 45 - 83:
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: Recordset1;
//Searchpage: drequests_search.php;
//Form: WADASearchForm;
$WADbSearch1_DefaultWhere = "0=0";
if (!session_id()) session_start();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations
//comparison list additions
$WADbSearch1->addComparisonFromEdit("Dealer_ID","Dealer_ID","AND","=",0);
//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_drequests_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_drequests_results"]) && $_SESSION["WADbSearch1_drequests_results"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_drequests_results"];
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';
?>
needs to be moved to line 6.
the other errors are a result of using the name "key" for one of your columns, this is a reserved word in MySQL.