Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想检索我的 Drupal DB 中的所有垃圾评论,以使用 SQLDELETE语句删除它们。我在 Drupal DB 的表 中找不到评论是如何被标记为垃圾邮件的。 表中唯一相关的列是,当评论未发布时,它的值为 0。 但是未发表的评论可以是合法评论(即尚未批准),也可以是垃圾评论。commentcommentstatus
DELETE
comment
status
那么,如何通过 SQL 检索所有垃圾评论以从评论表中删除它们呢?
您是否使用垃圾邮件模块来标记垃圾邮件?这里使用的 Drupal 版本和模块会有所帮助...
如果是这样,请检查垃圾邮件模块创建的表(我认为您要查找的是名为“spam_tracker”的表)并查找相关的外键(“content_id”?)。
那么这只是在删除查询中添加左连接的情况。