Skip to content
WJunction - Webmaster Forum

(SQL) How can I remove duplicate content from DB?

Status
Not open for further replies.
Hey,

I got over 2k duplicate content in my site SQL database, I need a quick solution to remove them and just keep the older/original post.

I used this command to sort the duplicate content according to titles:
Code:
SELECT title, COUNT(*) FROM dle_post Group BY `title` HAVING COUNT(*) > 1
here's the result:
[SLIDE]http://i27.lulzimg.com/c173a98425.jpg[/SLIDE]

As you can see, below each title there are 2-4 "copies" - I want to keep one and remove the rest. Is that possible? :D

I look forward to reading your thoughts.
Thanks in advance.
 

1 comment

Status
Not open for further replies.

About the author

H
Senior Member · Joined
1,458
Messages
79
Reactions
48
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom