Below is the code I am using, I have rewritten it for the purpose of posting but it still gives the same results....
PHP Code:
<?php require_once('../Connections/vse.php'); ?>
<?php
mysql_select_db($database_vse, $vse);
$advSql = "SELECT * FROM vse_villa_details WHERE 1=1";
$advResult = mysql_query($advSql, $vse);
$row_advResult = mysql_fetch_assoc($advResult);
if(isset($_GET['location']))
$advSql .=" AND state_region = {$location}";
do {
echo $row_advResult['villa_id'];
echo '<br>';
echo $row_advResult['villa_name'];
echo '<br>';
echo $row_advResult['state_region'];
echo '<br>';
} while($row_advResult = mysql_fetch_assoc($advResult));
?><br>
location = <? echo $location; ?><br>
sql = <? echo $advSql; ?>
I have echoed the location search as well as the sql query the results are as follows:
PHP Code:
15
villa_dos
LA
14
villa america
Florida
location = florida
sql = SELECT * FROM vse_villa_details WHERE 1=1 AND state_region = florida
Any help would be appreciated
SpikeZ
Bookmarks