微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Woocommerce 和 Yoast 产品搜索错误

如何解决Woocommerce 和 Yoast 产品搜索错误

我一直在尝试在管理区域使用产品搜索,它以前工作正常,现在我收到此错误

SELECT disTINCT posts.ID as product_id,posts.post_parent as parent_id FROM mu05iq_posts posts
             LEFT JOIN mu05iq_wc_product_Meta_lookup wc_product_Meta_lookup ON posts.ID = wc_product_Meta_lookup.product_id
              LEFT JOIN mu05iq_wc_product_Meta_lookup parent_wc_product_Meta_lookup
             ON posts.post_type = 'product_variation' AND parent_wc_product_Meta_lookup.product_id = posts.post_parent 
            WHERE posts.post_type IN ('product','product_variation')
             AND (  ( ( posts.post_title LIKE '%fiber%') OR ( posts.post_excerpt LIKE '%fiber%') OR ( posts.post_content LIKE '%fiber%' ) OR ( wc_product_Meta_lookup.sku LIKE '%fiber%' )  OR ( wc_product_Meta_lookup.sku = "" AND parent_wc_product_Meta_lookup.sku LIKE '%fiber%' ) )) 
            
            
            ORDER BY posts.post_parent ASC,posts.post_title ASC
        

wordpress database error: [UnkNown column '1' in 'where clause']
SELECT COUNT( 1 ) FROM mu05iq_postMeta WHERE post_id IN( SELECT ID FROM mu05iq_posts WHERE post_type = 'product' ) && Meta_value = "1" AND Meta_key = '_yoast_wpSEO_is_cornerstone'

如果有人有任何想法,我将不胜感激。 感谢和问候。

解决方法

如果有人遇到此问题,这是数字海洋管理的数据库设置,当您创建数据库集群时,它会在全局 SQL 模式下设置一些设置,只需删除 ANSI_QUOTES。这解决了我的问题。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。