一般注册机与灌水机都是批量的注册账户并灌水发帖
因此注册的uid一般是连续的
可以通过uid来批量删除用户及相关数据
比如大于某uid的批量删除的sql
- set @delid = 1000000;
- delete from pre_home_feed where uid > @delid;
- delete from pre_home_share where uid > @delid;
- delete from pre_home_comment where uid > @delid;
- delete from pre_home_blogfield where uid > @delid;
- delete from pre_home_blog where uid > @delid;
- delete from pre_home_class where uid > @delid;
- delete from pre_home_pic where uid > @delid;
- delete from pre_common_member where uid > @delid;
- delete from pre_common_member_count where uid > @delid;
- delete from pre_common_member_field_forum where uid > @delid;
- delete from pre_common_member_field_home where uid > @delid;
- delete from pre_home_album where uid > @delid;
- delete from pre_home_docomment where uid > @delid;
- delete from pre_home_doing where uid > @delid;
- delete from pre_home_notification where authorid > @delid;
- delete from pre_forum_post where authorid > @delid;
- delete from pre_forum_thread where authorid > @delid;
- delete from pre_portal_comment where uid > @delid;
- delete from pre_common_member_profile where uid > @delid;
- delete from pre_common_member_status where uid > @delid;
- delete from pre_ucenter_members where uid > @delid;
复制代码
以上句子在后台---站长---数据库---升级 运行
或上phpmyadmin运行下
其中
是定义uid=1000000
大于该uid的用户和关联数据全部删除
可以根据自己站点实际情况定义该值
其中的语句可以单独拆分进行处理 |
|
|
|
|