I'm having the following problem:
Let's assume I have a table with 3 fields: ID (type int), NAME(type varchar), EMAIL (type varchar) in a mysql db.
The fields have the following data stored:
1, jack, jack@jack.com
2, tom, jack@jack.com
3, jack, jack@jack.com
.
.
.
.
2000, jack, jack@jack.com
Now let's say I have like some thousand entries like that one above with each one containing different data. So if there are entries which have the same email adress, how I can I select exclusively those entries with the duplicate data in it?
So the result of a selection should look something like this:
(If I want to show the selection results in html):
<table>
<tr>
<td>First matching duplicate entry.</td>
<td>Second matching duplicate entry.</</td>
</tr>
<tr>
<td>1, jack, [email]jack@jack.com[/email]</td>
<td>2, tom, [email]jack@jack.com[/email]</td>
</tr>
</table>
what does the php code have to look alike?