Results 1 to 9 of 9
Thread: Show me the duplicates
Sep 14, 2013, 05:52 #1
- Join Date
- Nov 2004
- 2 Post(s)
- 0 Thread(s)
Show me the duplicates
Now I have a table, where I know there are duplicate e-mail.
I would like something that echoes out all the duplicates and a number next to it telling me how many duplicates I have.
and so on... showing me only the ones that have duplicates and the top one first.
What I have now is just showing me the top one, so I guess there only have to be a modification of the following:
$result = mysql_query("SELECT email, COUNT(email) AS countemail FROM temp_db GROUP BY email ORDER BY countemail DESC LIMIT 1");
$row = mysql_fetch_assoc($result);
echo "<p>The most duplicated email is " . $row['email'] . "</p>";