请事先备份数据库
经测试执行后需要更新缓存,否则发新帖子有问题
后台执行如下Sql语句即可。建议在网络比较畅快的时候使用,数据库过大不建议使用
不过重复帖子一般源于采集,呵呵
—————————————————————
create table bak as (select * from cdb_threads group by subject having count(*)=1);
insert into bak (select * from cdb_threads group by subject having count(*)>1);
truncate table cdb_threads;
insert into cdb_threads select * from bak;
——————————————————————–
此Sql语句可以删除任何的重复数据,红色部分为表名 绿色部分为字段值
注释版:
create table bak as (select * from cdb_threads group by subject having count(*)=1);
新建bak 然后把帖子没有重复的写进去
insert into bak (select * from cdb_threads group by subject having count(*)>1);
然后再把不止一条,也就是重复的也写入
truncate table cdb_threads;
删除
insert into cdb_threads select * from bak;
把文件从BAK中写入回数据库