discuz运营一些常用sql语句

discuz阅读模式

清零所有附件下载次数

UPDATE pre_forum_attachment SET downloads = 0

清零所有附件下载用户记录

同:清空所有用户的积分变化的记录

清零所有帖子的访问次数

UPDATE pre_forum_thread SET views = 0

清空所有用户的积分变化的记录【不是把所有用户的积分变成0,只是每次积分变化的记录】

DELETE FROM pre_common_credit_log

清空所有系统提醒消息

DELETE FROM pre_home_notification

清空所有站内短消息

DELETE FROM `pre_ucenter_pm_lists` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_members` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_members` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_messages_0` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_messages_1` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_messages_2` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_messages_3` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_messages_4` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_messages_5` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_messages_6` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_messages_7` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_messages_8` WHERE 1 ;
DELETE FROM `pre_ucenter_pm_messages_9` WHERE 1 ;