Max Well-known member Oct 17, 2022 #1 Hi how to mass delete all the posts with exact word only? eg.. Want to delete posts only with the word "Yes" Not "Yes i am" "I like, Yes" This can easily be done with phpmyadmin, but will it create a problem in xenforo?
Hi how to mass delete all the posts with exact word only? eg.. Want to delete posts only with the word "Yes" Not "Yes i am" "I like, Yes" This can easily be done with phpmyadmin, but will it create a problem in xenforo?
AndyB Well-known member Oct 17, 2022 #2 You might like this add-on: https://xenforo.com/community/resources/delete-posts-keywords.5984/ Upvote 0 Downvote
Max Well-known member Oct 17, 2022 #4 AndyB said: You might like this add-on: https://xenforo.com/community/resources/delete-posts-keywords.5984/ Click to expand... Is it have the option to delete posts which have the exact word only? seems like its deleting any post matching the keyword. Upvote 0 Downvote
AndyB said: You might like this add-on: https://xenforo.com/community/resources/delete-posts-keywords.5984/ Click to expand... Is it have the option to delete posts which have the exact word only? seems like its deleting any post matching the keyword.
Mr Lucky Well-known member Oct 17, 2022 #5 I don’t get how you could delete all posts with the word yes and still have a viable forum. Upvote 0 Downvote
Mr Lucky Well-known member Oct 17, 2022 #6 OK I think I see what you mean. The word yes but no other words? Upvote 0 Downvote
Max Well-known member Oct 17, 2022 #8 Mr Lucky said: OK I think I see what you mean. The word yes but no other words? Click to expand... yeah. and i took "yes" as an example. actually i want to delete some spammers posts containing only his company name. Upvote 0 Downvote
Mr Lucky said: OK I think I see what you mean. The word yes but no other words? Click to expand... yeah. and i took "yes" as an example. actually i want to delete some spammers posts containing only his company name.
K Kirby Well-known member Oct 17, 2022 #9 PHP: $posts = \XF::finder('XF:Post')->where('message', '=', 'Yes')->fetch(); foreach ($posts as $post) { $post->delete(); } Upvote 0 Downvote
PHP: $posts = \XF::finder('XF:Post')->where('message', '=', 'Yes')->fetch(); foreach ($posts as $post) { $post->delete(); }
Max Well-known member Oct 18, 2022 #10 Kirby said: PHP: $posts = \XF::finder('XF:Post')->where('message', '=', 'Yes')->fetch(); foreach ($posts as $post) { $post->delete(); } Click to expand... Thank you very much. How to use regex within this? Upvote 0 Downvote
Kirby said: PHP: $posts = \XF::finder('XF:Post')->where('message', '=', 'Yes')->fetch(); foreach ($posts as $post) { $post->delete(); } Click to expand... Thank you very much. How to use regex within this?