[thelist] Merge Duplicate Records in MySQL/PHP

r937 rudy at r937.com
Fri Jul 4 06:27:51 CDT 2008


> I have a dozen other tables which have a foreign key
> to this table and store additional data about each person,
> such as favorite food and hair color and education etc.

what were you thinking!!!  separate tables???

;o)

>  is there an automated way I can do this [merge the records]

no, but you can write one query per each of these dozen tables and find the
duplicates easily enough

it isn't going to be pretty but after you've finished, i trust you will have
a better appreciation for the importance of avoiding duplicates ~before~
populating your tables

i blame the stupid database system for having an auto_increment concept

imagine what you would have done if you had not been allowed to use an
auto_increment

;o)





More information about the thelist mailing list