View Single Post
Old 06-02-2008, 08:14 AM  
Phil
Confirmed User
 
Phil's Avatar
 
Join Date: Jan 2004
Posts: 7,659
Quote:
Originally Posted by Electric Lights View Post
Isn't there a free plugin that does exactly the same?
yes, there is.

Douchebag just makes it sound like he re-invented the fucking wheel. Here’s free plugin called “mysql query” to delete duplicate post.. That other stuff is part of wp-o-matic (sp?) plugin. I bet he just re-used (borrowed) the code from there.. After all its GPL. Cyber communism..

DELETE bad_rows.*
from wp_posts as bad_rows
inner join (
select post_title, MIN(id) as min_id
from wp_posts
group by post_title
having count(*) > 1
) as good_rows on good_rows.post_title = bad_rows.post_title
and good_rows.min_id <> bad_rows.id
__________________
Ask Phil
Phil is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote