I need to find & display duplicate rows in my mysql table.
I found a solution to FIND duplicate records, from this article.
But Now I want to DISPLAY the found rows(Both records - Original record & Duplicates) like below.
Orginal
ID firstname lastname ect..
100 John Martin blah
Possible Duplicate/s
ID firstname lastname ect..
101 John Martine blah
Please help me with this.
I have know idea how to display/print both records.
SQL Query
SELECT firstname,
lastname,
list.address
FROM list
INNER JOIN (SELECT address
FROM list
GROUP BY address
HAVING COUNT(id) > 1) dup
ON list.address = dup.address;
Edit : Dear All, I am clear with mysql query.
I want to print is to a specific page using PHP