Php mysql help....
Posted: Wed Mar 25, 2009 7:09 am
i have this code but it doesnt seem to produce the correct results can anybody help me? is there something wrong with this block?
i am using this code below to get the variables;
-----------------------------------------
$pid= 0;
if(isset($_GET['recordID'])){
$pid= $_GET['recordID'];
}
$spid=strtoupper($pid);
$pc= 0;
if(isset($_GET['pc'])){
$pc= $_GET['pc'];
}
----------------------------
mysql_select_db($database_property, $property);
$query_pview = "SELECT * FROM landlords where postcode like '%$pid' or postcode= '$spid'";
$query_limit_pview = sprintf("%s LIMIT %d, %d", $query_pview, $startRow_pview, $maxRows_pview);
$pview = mysql_query($query_limit_pview, $property) or die(mysql_error());
$row_pview = mysql_fetch_assoc($pview);
is there a better option on how to search the database? Thanks.
i am using this code below to get the variables;
-----------------------------------------
$pid= 0;
if(isset($_GET['recordID'])){
$pid= $_GET['recordID'];
}
$spid=strtoupper($pid);
$pc= 0;
if(isset($_GET['pc'])){
$pc= $_GET['pc'];
}
----------------------------
mysql_select_db($database_property, $property);
$query_pview = "SELECT * FROM landlords where postcode like '%$pid' or postcode= '$spid'";
$query_limit_pview = sprintf("%s LIMIT %d, %d", $query_pview, $startRow_pview, $maxRows_pview);
$pview = mysql_query($query_limit_pview, $property) or die(mysql_error());
$row_pview = mysql_fetch_assoc($pview);
is there a better option on how to search the database? Thanks.