Hi ppl I need help with my php basically I manage to get my php to display the uname that matches the sql condition however it only return 1 record when there are 2 record that match the condition how do I make it display all record that matches the condition instead of displaying just one?
This is my code:
[PHP]
$resultpostal=m ysql_query("SEL ECT location.uname, location.uid FROM location,distri cts WHERE districts.distr ictno ='56' AND
location.lat BETWEEN districts.start lat AND districts.endla t AND location.lng BETWEEN districts.start lng AND districts.endln g");
$counterx=0;
if($row=mysql_f etch_array($res ultpostal)){
foreach($row as $col_value){
$temp[$counterx]=$col_value;
$counterx++;
}
$report.="uid". "=".$temp[0]."&";
$report.="uname "."=".$temp[1]."&";
echo $report;
[/PHP]
This is my code:
[PHP]
$resultpostal=m ysql_query("SEL ECT location.uname, location.uid FROM location,distri cts WHERE districts.distr ictno ='56' AND
location.lat BETWEEN districts.start lat AND districts.endla t AND location.lng BETWEEN districts.start lng AND districts.endln g");
$counterx=0;
if($row=mysql_f etch_array($res ultpostal)){
foreach($row as $col_value){
$temp[$counterx]=$col_value;
$counterx++;
}
$report.="uid". "=".$temp[0]."&";
$report.="uname "."=".$temp[1]."&";
echo $report;
[/PHP]
Comment