当我启用调试时,我在 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/