Error Message----
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0 != 0 ORDER BY unclassified.ad_post_date DESC' at line 1
Page Code----
<?php require_once('Connections/connauto.php'); ?>
<?php require_once('Connections/connauto.php');?>
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if(isset($_POST["login1"])){
$WA_Auth_Parameter = array(
"connection" => $connauto,
"database" => $database_connauto,
"tableName" => "client_info",
"columns" => explode($WA_Auth_Separator,"client_email".$WA_Auth_Separator."client_pw".$WA_Auth_Separator."client_verified"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["user_name"]))?$_POST["user_name"]:"") ."".$WA_Auth_Separator."".((isset($_POST["password"]))?$_POST["password"]:"") ."".$WA_Auth_Separator."yes"),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"client_ID"),
"sessionNames" => explode($WA_Auth_Separator,"client_ID"),
"successRedirect" => "my_account1.php",
"failRedirect" => "?failed=true",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);
WA_AuthenticateUser($WA_Auth_Parameter);
}
?>
<?php
//WA Database Search Include
require_once("WADbSearch/HelperPHP.php");
?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: rs_unclassified;
//Searchpage: ;
//Form: ;
$WADbSearch1_DefaultWhere = "0 != 0";
if (!session_id()) session_start();
if ((((isset($_POST["search1"]))?$_POST["search1"]:"") != "")) {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations
//comparison list additions
$WADbSearch1->addComparison("ad_city_state","".((isset($_POST["search_location"]))?$_POST["search_location"]:"") ."","AND","Includes",0);
$WADbSearch1->addComparison("ad_header","".((isset($_POST["search_header"]))?$_POST["search_header"]:"") ."","AND","Includes",0);
$WADbSearch1->addComparison("ad_title","".((isset($_POST["search_title"]))?$_POST["search_title"]:"") ."","AND","Includes",0);
$WADbSearch1->addComparison("ad_price","".((isset($_POST["price_low"]))?$_POST["price_low"]:"") ."","AND",">=",1);
$WADbSearch1->addComparison("ad_price","".((isset($_POST["price_high"]))?$_POST["price_high"]:"") ."","AND","<=",1);
//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_unclassified_display1"]=$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_unclassified_display1"]) && $_SESSION["WADbSearch1_unclassified_display1"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_unclassified_display1"];
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_connauto, $connauto);
$query_rs_unclassified = "SELECT * FROM unclassified WHERE unclassified.ad_verify = 'Y' ORDER BY unclassified.ad_post_date DESC";
setQueryBuilderSource($query_rs_unclassified,$WADbSearch1,false);
$rs_unclassified = mysql_query($query_rs_unclassified, $connauto) or die(mysql_error());
$row_rs_unclassified = mysql_fetch_assoc($rs_unclassified);
$totalRows_rs_unclassified = mysql_num_rows($rs_unclassified);
function highlightResults($dataValue, $searchString) {
return (preg_replace("/$searchString/i", '<span style="color:red;">'.strtoupper($searchString).'</span>', $dataValue));
}
?>
</head>
<body>
<div id="outerWrapper">
<div id="header">
<table width="100%"id="head_table">
<tr>
<td width="27%"> <div style=" padding-top:15px."><br />
<br />
<br />
<br />
<img src="Logo/LaDollarSaverLogo_002.png" alt="LA Dollar Saver" width="234" height="51" /></div></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="4%"> </td>
<td><div id="logohearerdive">Introducing the Web’s First “Unclassified” <br />
<br />
Local Area Shopper. </div></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><br><br><br></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div style="line-height:22px;">Find what you want here...........</div></td>
<td> </td>
</tr>
</table></td>
<td width="35%" valign="top"><table width="400" cellpadding="5">
<tr>
<td width="40%">Log-In Here<br />
<a href="email_pw.php" target="_blank"><span class="style2">Forgot Login</span></a> <span class="style2">|</span> <a href="anfregister.php"><span class="style2">To Register</span></a> <span class="style2">|</span> <span class="style2"><a href="my_account1.php">MyAccount</a></span></td>
<td width="30%">
<input name="logout1" type="submit" class="stylelogin" id="logout1" style="width: 60px;" onclick="MM_goToURL('plugins/parent','LogOut.php');return document.MM_returnValue" value="LogOut" />
</tr>
</table>
<table width="100%" cellpadding="5">
<tr>
<td><span class="style3"><?php echo(isset($_GET['failed']))? "Login is not verified. Please try again":""; ?>
</span>
<form id="login" method="post">
<table width="90%" cellpadding="5">
<tr>
<td align="right"><strong><span class="style2">Email Address:</span></strong></td>
<td><input name="user_name" type="text" id="user_name" maxlength="75" /></td>
</tr>
<tr>
<td align="right"><strong><span class="style2">Password:</span></strong></td>
<td><input type="password" name="password" id="password" />
<br /></td>
</tr>
<tr>
<td align="right"> </td>
<td><input type="submit" name="login1" id="login1" value="LogIn" /></td>
</tr>
<tr>
<td align="right"></td>
<td></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="topNavigation">
<?php include("anf_incluse_nav.php") ?>
</div>
<div id="contentWrapper">
<div id="leftColumn1">
<h1>Unclassified Feature Items</h1>
</div>
<div id="content">
<table width="98%" border="1" cellpadding="5">
<tr align="center" valign="top">
<td><strong><em><span class="style1"><?php echo $totalRows_rs_unclassified ?> </span> Total Items from your Search</em></strong></td>
<td><a href="unclassified_display.php">New Search</a></td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="#FF9933">
<td width="25%" align="center" ><em><strong>Item Title</strong></em></td>
<td width="25%" align="center"><strong><em>Item Price</em></strong></td>
<td width="25%" align="center"><strong><em>Post Location</em></strong></td>
<td width="25%" align="center"><strong><em>Item Detail</em></strong></td>
</tr>
<?php do { ?>
<tr>
<td align="center" valign="top"><?php echo highlightResults($row_rs_unclassified['ad_title'], stripslashes($_POST["search_title"])); ?></td>
<td align="center" valign="top">$<?php echo $row_rs_unclassified['ad_price']; ?></td>
<td align="center" valign="top"><?php echo highlightResults($row_rs_unclassified['ad_city_state'], stripslashes($_POST["search_location"])); ?></td>
<td align="center" valign="top"><table>
<tr>
<td><img src="images/detail.gif" width="24" height="18" alt="Item Detail" /></td>
<td><a href="unclassified_display_detail.php?ad_ID=<?php echo $row_rs_unclassified['ad_ID']; ?>">Click Here</a></td>
</tr>
</table></td>
</tr>
<?php } while ($row_rs_unclassified = mysql_fetch_assoc($rs_unclassified)); ?>
</table>
</div>
</div>
<?php include("footer_include.php")?>
</div>
</body>
</html>
<?php
mysql_free_result($rs_unclassified);
?>