【问题标题】:Update Post_Content for Empty in All Posts from Category - Wordpress更新类别中所有帖子中为空的 Post_Content - Wordpress
【发布时间】:2018-10-13 05:15:01
【问题描述】:

我需要删除具有特定类别的 Wordpress 帖子的所有“post_content”内容。

UPDATE wpp_posts join wp_term_relationships on (wp_posts.ID = wp_term_relationships.object_id)
where wp_term_relationships.term_taxonomy_id = 410
SET post_content =

''

正在生成错误。

1064 - 您的 SQL 语法有错误;检查与您的 MariaDB 服务器版本相对应的手册,了解在 'where wpp_term_relationships.term_taxonomy_id = 410

附近使用的正确语法

SET post_content =

''' 在第 2 行

【问题讨论】:

    标签: wordpress


    【解决方案1】:

    SET post_content='' 必须在 where 子句之前。

    UPDATE wpp_posts join wp_term_relationships on (wp_posts.ID = wp_term_relationships.object_id)
    SET post_content = '' 
    WHERE wp_term_relationships.term_taxonomy_id = 410
    

    【讨论】:

    • 完美。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多