月薪1800块的站长
不打算了解一下吗

wordpress删除某分类下的所有文章sql命令

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 = 0(0替换为你要删除的分类ID)

 

赞(0)
分享到: 更多 (0)