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.
Php mysql help....
Moderator: General Moderators
Re: Php mysql help....
what is the error or the result that you are getting? Can you be more elaborate?
Re: Php mysql help....
Thanks for the response, no matter the value of the GET variable..... it bring out the same result.
even if the postcodes changes, it gets the sam result for N15, N22, E1,E7.
even if the postcodes changes, it gets the sam result for N15, N22, E1,E7.