mysql查询中的sql错误:错误:“on”子句中的“post\u taxonomy\u category”列未知

pgx2nnw8  于 2021-07-24  发布在  Java
关注(0)|答案(1)|浏览(277)

**结束。**此问题需要详细的调试信息。它目前不接受答案。
**想改进这个问题吗?**更新问题,使其成为堆栈溢出的主题。

10个月前关门了。
改进这个问题
mysql查询中的sql错误:
错误:“on”子句中的未知列“post\u taxonomy\u category”:

SELECT post_taxonomy_category_tbl.NAME         AS post_taxonomy_category, 
       post_meta_date_published_tbl.meta_value AS post_meta_date_published, 
       post_meta_author_tbl.meta_value         AS post_meta_author, 
       posts_post.post_title                   AS post_post_title, 
       posts_post.post_content                 AS post_post_content 
FROM   wp2k_posts AS posts_post 
       INNER JOIN (SELECT NAME, 
                          object_id AS id 
                   FROM   wp2k_terms AS post_taxonomy_category_tbl_terms 
                          INNER JOIN wp2k_term_taxonomy AS 
                                     post_taxonomy_category_tbl_termtaxonomy 
                                  ON 
post_taxonomy_category_tbl_termtaxonomy.term_id = 
       post_taxonomy_category_tbl_terms.term_id 
       AND post_taxonomy_category_tbl_termtaxonomy.taxonomy = 
       'category' 
       INNER JOIN wp2k_term_relationships AS rel_post_taxonomy_category_tbl 
       ON post_taxonomy_category_tbl_termtaxonomy.term_taxonomy_id = 
       rel_post_taxonomy_category_tbl.term_taxonomy_id) AS 
                  post_taxonomy_category_tbl 
               ON post_taxonomy_category_tbl.id = posts_post.id 
                  AND post_taxonomy_category = 'Published & Accepted Papers' 
       INNER JOIN (SELECT post_meta_date_published_tbl_posts.id AS id, 
                          meta_value, 
                          meta_key 
                   FROM   wp2k_postmeta AS post_meta_date_published_tbl_postmeta 
                          INNER JOIN wp2k_posts AS 
                                     post_meta_date_published_tbl_posts 
                                  ON 
post_meta_date_published_tbl_postmeta.post_id = 
           post_meta_date_published_tbl_posts.id 
AND post_meta_date_published_tbl_posts.post_type = 
    'post') AS post_meta_date_published_tbl 
               ON post_meta_date_published_tbl.meta_key = 'date_published' 
                  AND post_meta_date_published_tbl.id = posts_post.id 
       INNER JOIN (SELECT post_meta_author_tbl_posts.id AS id, 
                          meta_value, 
                          meta_key 
                   FROM   wp2k_postmeta AS post_meta_author_tbl_postmeta 
                          INNER JOIN wp2k_posts AS post_meta_author_tbl_posts 
                                  ON post_meta_author_tbl_postmeta.post_id = 
                                     post_meta_author_tbl_posts.id 
                                     AND post_meta_author_tbl_posts.post_type = 
                                         'post') 
       AS post_meta_author_tbl 
               ON post_meta_author_tbl.meta_key = 'author' 
                  AND post_meta_author_tbl.id = posts_post.id 
WHERE  1 = 1 
       AND posts_post.post_type = 'post'
vsdwdz23

vsdwdz231#

不能在中使用列别名 on 条款。你得改用真名- post_taxonomy_category_tbl.name .

相关问题