Hi all,
This is what i have so far.
<?
$result = mysql_query ("select * from $table where url in (select url from $table group by url having count(*) > 1 )");
echo "<table cellpadding=2 cellspacing=1 border=0>";
echo "There are <B>$howmany</B> duplicate URL's<BR><BR>";
$alternate = "2";
while ($row = mysql_fetch_array($result1)) {
$id = $row["CatID"];
$new_url = $row["url"];
if ($alternate == "1") {
$color = "#ffffff";
$alternate = "2";
}
else {
$color = "#efefef";
$alternate = "1";
}
echo "<tr bgcolor=$color><td>$new_url</td><td><a href='view.php?id=$id'>see details</a></td><td><a href='edit.php?id=$id'>edit record</a></td><td><a href='delete.php?id=$id' onClick=\"return confirm('Are you sure?')\">delete record</a></td></tr>";
}
echo "</table><br><br>";
?>
Can anyone tell me how to display the results if the url field contains duplicate values (i only want these rows to be displayed)?
Cheers,
micmac