1为分类ID 亲测可用!
delete
from
wp_posts
using
wp_posts,
wp_term_relationships,
wp_term_taxonomy
where
wp_posts.id=wp_term_relationships.object_id
and
wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
and
wp_term_relationships.term_taxonomy_id = 1
以上的SQL语句中,taxonomy_id = 1 后面的”1″是默认分类ID号,如果你的默认分类ID不是1,要更换成你自己的默认分类ID号。(相关知识:wordpress如何查看分类的ID号)
原创文章,作者:校长,如若转载,请注明出处:https://www.yundongfang.com/Yun270817.html