Topic awaiting preservation: MySQL/PHP finding duplicates in table |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 05-17-2006 14:44
Greets! |
Lunatic (VI) Inmate From: under the bed |
posted 05-17-2006 15:04 |
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 05-17-2006 18:30
Indeed, DL is on the right road. code: select count (id) as cnt from myTable GROUP by name HAVING cnt > 1
|
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 05-18-2006 01:10 |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 05-18-2006 02:23
Boy could I have used something like that about 2 months ago. |
Nervous Wreck (II) Inmate From: |
posted 05-18-2006 08:13
SELECT DISTINCT might also help compile an index of which rows you want to keep, though admittedly TP hit that nail pretty well already. |