Results of query displaying twice
Posted: Thu Jan 29, 2004 4:34 am
I have a database which is returning the results of a query. The only problem is that it is displaying the results twice.
Can anyone see why below in my code of finding and displaying the query
$resultID = mysql_query("SELECT * FROM tblcountyname where countyID = '$county'", $linkID)or die(mysql_error());
print "<table border=0 ><tr><th> CountyID</th>";
print "<th>CountyNear</th>";
while ($row = mysql_fetch_array($resultID, MYSQL_ASSOC))
{
print "<tr>";
print "<td>".$row['CountyID']."</td>";
print "<td>".$row['CountyNear']."</td>";
print "</tr>";
}
print"</table>";
mysql_close($linkID);
Can anyone see why below in my code of finding and displaying the query
$resultID = mysql_query("SELECT * FROM tblcountyname where countyID = '$county'", $linkID)or die(mysql_error());
print "<table border=0 ><tr><th> CountyID</th>";
print "<th>CountyNear</th>";
while ($row = mysql_fetch_array($resultID, MYSQL_ASSOC))
{
print "<tr>";
print "<td>".$row['CountyID']."</td>";
print "<td>".$row['CountyNear']."</td>";
print "</tr>";
}
print"</table>";
mysql_close($linkID);