前些天采集的一些内容,感觉没有多大的用处,或者没有多大的意思,想着删除掉,在这里的截图大家看到了,才两千多条,即便是使用织梦自带的删除也不是费事儿的事儿,可是大家想一想,批量采集的一两万十来万条的数据,若是三十条三十条的批量删除,真不敢想
前些天采集的一些内容,感觉没有多大的用处,或者没有多大的意思,想着删除掉,在这里的截图大家看到了,才两千多条,即便是使用织梦自带的删除也不是费事儿的事儿,可是大家想一想,批量采集的一两万十来万条的数据,若是三十条三十条的批量删除,真不敢想象要等到那个猴年马月去,所以我想到了使用SQL批量删除语句,毕竟织梦也是PHP的程序么,利用SQL语句,到织梦后台运行就可以。
首先来说一下按照栏目id来批量删除的方法;
1
DELETE
FROM dede_addonimages WHERE typeid = 10 ;
2
DELETE
FROM dede_arctiny WHERE typeid = 10 ;
3
DELETE
FROM dede_archives WHERE typeid = 10 ;
1
DELETE
FROM dede_addonimages WHERE typeid = 10 ;
1
dede_addonimages
1
DELETE
FROM dede_addonarticle WHERE typeid = 10 ;
2
DELETE
FROM dede_arctiny WHERE typeid = 10 ;
3
DELETE
FROM dede_archives WHERE typeid = 10 ;
1
DELETE
FROM dede_addonarticle WHERE aid >= 1
and
aid <=3000;
2
DELETE
FROM dede_arctiny WHERE id >= 1
and
id <=3000;
3
DELETE
FROM dede_archives WHERE id >= 1
and
id <=3000;
1
WHERE aid >= 1
and
aid <=3000;
2
WHERE id >= 1
and
id <=3000;
3
WHERE id >= 1
and
id <=3000;
1
DELETE
FROM dede_addonarticle WHERE aid > = 1
and
aid < =3000;
2
DELETE
FROM dede_arctiny WHERE id > = 1
and
id < =3000;
3
DELETE
FROM dede_archives WHERE id > = 1
and
id < =3000;
如果本文对你有帮助,欢迎打赏本站