0

我在此查询中收到系统税错误。

SELECT 
    e.post_id as id, e.start as start_date, 
    p.post_title, 
    c.name as category 
FROM 
    wp_ai1ec_events as e LEFT_JOIN wp_term_relationships as t ON e.post_id = t.object_id 
    LEFT_JOIN wp_term_relationships as t ON e.post_id = t.object_id 
    LEFT_JOIN wp_terms as c ON c.term_id = t.term_taxonomy_id
    LEFT_JOIN wp_posts as p ON p.ID = e.post_id
GROUP BY e.post_id

实际上,在这种情况下,我什至可能不需要左连接,因为所有连接都应该附加到一行......

Error: #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 'LEFT_JOIN wp_term_relationships as t ON e.post_id = t.object_id LEFT_JOIN w' at line 6

任何帮助,将不胜感激。谢谢。

4

1 回答 1

10

中没有下划线LEFT JOIN

LEFT_JOIN应该LEFT JOIN

于 2013-02-26T14:33:01.713 回答