markdown 如何删除包含部分单词的WordPress评论?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 如何删除包含部分单词的WordPress评论?相关的知识,希望对你有一定的参考价值。

#### Count the total records

```
SELECT COUNT(*) FROM wp_comments WHERE comment_content LIKE '%yahoo%';
SELECT COUNT(*) FROM wp_comments WHERE comment_content LIKE '%gmail%';
SELECT COUNT(*) FROM wp_comments WHERE comment_content LIKE '%whatsapp%';
SELECT COUNT(*) FROM wp_comments WHERE comment_content LIKE '%sex toy%';
SELECT COUNT(*) FROM wp_comments WHERE comment_content LIKE '%outlook%';
```

#### See the records

```
SELECT * FROM wp_comments WHERE comment_content LIKE '%yahoo%';
SELECT * FROM wp_comments WHERE comment_content LIKE '%gmail%';
SELECT * FROM wp_comments WHERE comment_content LIKE '%whatsapp%';
SELECT * FROM wp_comments WHERE comment_content LIKE '%sex toy%';
SELECT * FROM wp_comments WHERE comment_content LIKE '%outlook%';
```

#### Delete the records

```
DELETE FROM wp_comments WHERE comment_content LIKE '%yahoo%';
DELETE FROM wp_comments WHERE comment_content LIKE '%gmail%';
DELETE FROM wp_comments WHERE comment_content LIKE '%whatsapp%';
DELETE FROM wp_comments WHERE comment_content LIKE '%sex toy%';
DELETE FROM wp_comments WHERE comment_content LIKE '%outlook%';
```

It's also a good practice to keep all the words above inside your WP Comments Blacklist. Read more [here](https://digwp.com/2010/02/stop-spammers-custom-blacklist/).

以上是关于markdown 如何删除包含部分单词的WordPress评论?的主要内容,如果未能解决你的问题,请参考以下文章

如何从文本文件中删除重复并包含某些单词的行?

如何使用批处理脚本删除名字包含特定单词的html文件?

如何选择包含特定子字符串的单词列表作为 SQL 查询(oracle)的一部分?

删除包含指定单词的所有行[重复]

如何从一行中删除某些单词,但将其余部分放入带有批处理的字符串/变量中?

从表单字段中删除单词的代码