WordPress 帖子页面上的 MYSQL SQL 语法错误

标签 mysql wordpress

当我启用调试时,我在 WordPress 帖子页面上看到以下错误。当我开始向我的帖子添加类别并且它们没有保存时​​,我才注意到这一点。我以前从未使用过类别,所以我不确定这个问题存在多久了。我已经切换了主题并禁用了所有插件,但仍然看到该问题。

[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 ') ORDER BY t.name ASC' at line 1]

SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t 
INNER JOIN wp_term_taxonomy AS tt 
ON t.term_id = tt.term_id 
INNER JOIN wp_term_relationships AS tr 
ON tr.term_taxonomy_id = tt.term_taxonomy_id 
WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format', 'yst_prominent_words') 
AND tr.object_id IN (1461, 1475, 1539, 1605, 1708, 1732, 1760, 1764, 2292, 2311, 2343, 2368, 2374, 2380) 
AND t.term_id NOT IN() ORDER BY t.name ASC

最佳答案

以下表达式无效:

AND t.term_id NOT IN()

关于WordPress 帖子页面上的 MYSQL SQL 语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55267633/

相关文章:

php - 上传时如何将图像尺寸或质量减小到特定尺寸

mysql - 如何从 datetimepicker 接收日期并将其保存到数据库中?

html - div出现在背景中

php - 添加随机 URL 链接到随机背景图片

php - Wordpress 分页翻译

php - 来自数据库的给定月份和年份的事件,或其他建议

mysql - 无法在 Apache Drill 中创建新的 mysql 存储

php - 如何从 Joomla 中的数据库获取文章的介绍图片路径

javascript - 使用子主题从 WordPress 主题出列脚本返回 "Uncaught ReferenceError: add_action is not defined"错误

wordpress - 将订单元数据添加到 WooCommerce 管理订单概述