Forum Moderators: coopster

Message Too Old, No Replies

Filtering duplicate results with MySQL

Duplicate result removal

         

flairview

7:31 am on Jun 7, 2005 (gmt 0)

10+ Year Member



I've been working on this thing for the past 2 days and pretty much got no where.
Here is the problem, i have a large database of about 70k rows and have a large number of duplicate results - not completly duplicate just some columns are.
For example i have:
term: widget
description: this wigdet is good

term: widget
description: test

Now i wish to have only one term but combine the description, that is:
term: widget
description: this wigdet is good, test

I get to the point where i can select all my duplicate results but then i am stuck.
Anyone has done this before in MySQL and PHP (or just MySQL)?

Cheers,

fv

varunkrish

9:34 am on Jun 7, 2005 (gmt 0)

10+ Year Member



use SELECT DISTINCT columname

this will give only distint results and not any duplicates

flairview

11:36 am on Jun 7, 2005 (gmt 0)

10+ Year Member



SELECT DISTINCT doesn't do the job. I need to merge columns together.
SELECT DISTINCT would just remove 10% of data from my table, the data which is not completly identical - only identical in one column.

rfontaine

8:02 pm on Jun 7, 2005 (gmt 0)

10+ Year Member



Whip up a php or perl script to do this.