Posted By Jack Hoelz on 10/09/2010 6:06 AM
I need help with a script to mass delete comments by the following:
1/ Author - delete all comments on articles published by a specific author
2/ ArticleID - delete all comments for a speficic article.
3/ ArticleID w/date range
4/ Portal - delete all comments for all articles in a specific portal
5/ ModuleID - delete all comments for a specific module ID
It would be really nice if this feature was available from the admin portion of the module
Thanks for your help
Hello,
That should do the trick:
1/
DELETE FROM DnnForge_NewsArticles_Comment
WHERE UserId = xx
With xx the AuthorID number.
2/
DELETE FROM DnnForge_NewsArticles_Comment
WHERE ArticleId = xx
With xx the ArticleId number.
3/
DELETE FROM DnnForge_NewsArticles_Comment
WHERE CreatedDate > xxxxxx
With xxxxx the date.
4/
I don't know
5/
DELETE FROM DnnForge_NewsArticles_Comment
WHERE ArticleId IN (Select ArticleId FROM DnnForge_NewsArticles_Article WHERE ModuleId = xx)
With xxxxx the ModuleID
Hope it helps,
DV FX
|