需要一个 MySQL 查询来删除重复的评论
我的 WordPress 网站最近被黑客攻击,所以我不得不重新安装所有内容。重新安装了 WordPress,导入了数据库备份,一切都很好。然后我安装了 Disqus 插件并同步(Disqus 之前在网站被黑客攻击之前使用过)。显然是大禁忌。现在我网站上的每条评论都有副本!更糟糕的是,重复的评论已同步回 Disqus!
所以,我知道这是 PHPMyAdmin 中的一个简单查询,但我不知道!请帮忙!
My wordpress site was recently hacked so I had to reinstall everything. Wordpress resinstalled, database backups imported, everything fine and dandy. Then I installed the Disqus plugin and synced (Disqus was previously used before the site was hacked). Big no-no apparantly. Now I have a duplicate of every single comment on my site! Even worse, the duplicate comments have been synced BACK to Disqus!
So, I know this is a simple query in PHPMyAdmin but I don't know it! Please help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
天哪,我刚刚发布了这个,因为有人将其迁移到了 SO...!幸运的是,我在这里也有一个帐户:)
为了上帝的爱,首先备份你的数据库
我还没有尝试过这个查询,因为我没有备用数据库可以使用。
不过,这应该对您有帮助:
由于它是 WordPress 评论,假设前缀为
wp
,我可能会推荐......希望有所帮助。在考虑运行此查询之前,请先阅读粗体注释。
D'oh, I just posted this as someone migrated it to SO...! Fortunately I have an account here too :)
FOR THE LOVE OF GOD BACK YOUR DATABASE UP FIRST
I haven't tried this query as I don't have a spare database to play around with.
This should help you though:
As it's WordPress comments, presuming a prefix of
wp
, I'd probably recommend....Hope that helps. Please read the note in bold before even contemplating running this query.