老外博客找来的,很实用,速度很快,执行SQL语句秒删除重复标题文章:
DELETE a.* FROM wp_posts AS a INNER JOIN ( SELECT post_title, MIN( id ) AS min_id FROM wp_posts WHERE post_type = 'post' AND post_status = 'publish' GROUP BY post_title HAVING COUNT( * ) > 1 ) AS b ON b.post_title = a.post_title AND b.min_id <> a.id AND a.post_type = 'post' AND a.post_status = 'publish'
本文提供了一条SQL执行语句,能够快速删除WordPress中具有重复标题的已发布文章。通过内连接的方式找到每组重复标题文章中的最小ID,并保留它,其余的重复文章将被删除。
1720

被折叠的 条评论
为什么被折叠?



