Results of query displaying twice

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
nutstretch
Forum Contributor
Posts: 104
Joined: Sun Jan 11, 2004 11:46 am
Location: Leicester

Results of query displaying twice

Post by nutstretch »

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); 8O
nutstretch
Forum Contributor
Posts: 104
Joined: Sun Jan 11, 2004 11:46 am
Location: Leicester

solved

Post by nutstretch »

Code was fine I :? had imported the data into my database twice by mistake!!!! Some day I will stop making stupid mistakes
Post Reply