Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

what is the mysql query to remove topics& messages with less than x views

Aloittaja ryansdistrict, heinäkuu 04, 2008, 09:18:49 AP

« edellinen - seuraava »

ryansdistrict

Helllo
my site is getting out of control
i want to run a mysql query that will remove all topics which have less than x views and from specific forum id
for example i want to remove topics with less than 5 views in the news forum whose id is 5
i want to remove topics form the database from both topics and messages tables which are under the condition mentioned

What is the query that does this

Thank you
For Sale: RD.com-PS.com

vbgamer45

There is not an easy single sql query but you could use the removepost topic functions built in smf.
Do a lookup in the topics for the category id and remove the topics that have less than a certain amount of views in a topic.

If you do it via sql likely things won't be removed completely, stats wrong etc.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: