examples of a batch delete query to delete spam forum messages ?

examples of a batch delete query to delete spam forum messages ?

by Pascal Boulerie -
Number of replies: 0
Right now the forum https://moodle.org/mod/forum/view.php?id=1778 has been flooded with a group of young students requesting for help to learn about Moodle... They are so lazy, they just ask the very same question the very same day, and do not take time to help each other.


I think it is possible to do a delete batch to suppress all these messages . I have not found any sample query *, such as :

delete from forum_posts where subject like "%word1%" AND subject like "%word2%" AND created = "(creation date here)"


The question can be related to this now closed discussion :

- Fighting spam on moodle.org

https://moodle.org/mod/forum/discuss.php?d=307795


* Custom SQL queries

https://docs.moodle.org/36/en/Custom_SQL_queries_report



By the way, the Moodle doc about forum tables is not detailed in :

- Moodle Database structure

https://docs.moodle.org/36/en/Development:Database_schema_introduction

(sorry I do not have time to edit the wiki content and add a longer description of the 8 forum tables with a link from this schema introduction page...)


Average of ratings: -