gpt4 book ai didi

mysql - 更新菜单 WordPress 时出现 SQL 错误

转载 作者:行者123 更新时间:2023-11-29 10:30:41 25 4
gpt4 key购买 nike

最近,当我尝试更改文字新闻网站中的菜单时,我收到一条错误消息

[You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE woocommerce_term_id = 110 AND meta_key = 'thumbnail_id'' at line 1] SELECT * FROM WHERE woocommerce_term_id = 110 AND meta_key = 'thumbnail_id'

这是使用的查询

SELECT * FROM WHERE woocommerce_term_id = 110 AND meta_key = 'thumbnail_id'

目前我仍然可以毫无问题地对网站进行更改,但我仍然认为当我使用该网站时会出现问题。

有谁知道这个问题的解决办法吗?

最佳答案

您没有在选择查询中提供表名称:

SELECT * FROM WHERE woocommerce_term_id = 110 AND meta_key = 'thumbnail_id'

应该是这样的:

SELECT * FROM <yourTableName> WHERE woocommerce_term_id = 110 AND meta_key = 'thumbnail_id'

SQL 遵循以下协议(protocol):

--** pseudocode **
SELECT <tableColumns>
FROM <table or view>
WHERE <your conditions>

For now I can still make changes to the site without any problems, but I still think that there'll be a problem when I go live with the site.

毫无疑问,您的查询将立即失败。

关于mysql - 更新菜单 WordPress 时出现 SQL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47456601/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com