#删除指定分类的文章

delete
from
xn_posts
using
xn_posts,
xn_term_relationships,
xn_term_taxonomy
where
xn_posts.id = xn_term_relationships.object_id
and
xn_term_relationships.term_taxonomy_id = xn_term_taxonomy.term_taxonomy_id
and
xn_term_relationships.term_taxonomy_id = 18(分类ID)

#删除分类

delete FROM `xn_term_relationships` where term_taxonomy_id = 18(分类ID)