0
我想查詢wordpress數據庫。但是我得到這個錯誤,我無法弄清楚。誰能幫我。WordPress的數據庫的MySQL語法錯誤
查詢:
SELECT DISTINCT aub_terms.* FROM aub_term_relationships
JOIN aub_posts ON aub_posts.ID = aub_term_relationships.object_id
JOIN aub_term_taxonomy ON aub_term_taxonomy.term_taxonomy_id = aub_term_taxonomy.term_taxonomy_id
JOIN ON aub_term_taxonomy.term_id = aub_terms.term_id
WHERE `aub_term_taxonomy`.`taxonomy` = 'post_tag'
AND aub_posts.ID IN (254,239,175,150,119,65,63,61,59,54,51);
錯誤:
#1064 - 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 'ON aub_term_taxonomy.term_id = aub_terms.term_id WHERE `aub_term_taxonomy`.`taxo' at line 1
這是什麼........您的查詢是最差的。有很多問題並且不正確。 – 2013-04-11 08:55:46
你可以解釋...'加入aub_term_taxonomy on aub_term_taxonomy.term_taxonomy_id = aub_term_taxonomy.term_taxonomy_id' – 2013-04-11 08:57:47
它的工作現在是。但沒有結果。我從堆棧溢出中得到了這個查詢。但看起來沒用 – 2013-04-11 09:00:55