我对 php left join 有一些问题
php给我写一个错误
您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 12 行的“FROM ipb_topics t LEFT JOIN ipb_posts p ON p.topic_id = t.tid LEFT JOIN ipb_at”附近使用正确的语法
代码是
$query = mysql_query("
SELECT
t.tid as tid,
t.title as title,
t.start_date as start_date,
t.title_seo as title_seo,
p.post as post,
a.attach_location as attach_location,
FROM ".$forum_prefix."topics t
LEFT JOIN ".$forum_prefix."posts p ON p.topic_id = t.tid
LEFT JOIN ".$forum_prefix."attachments a ON a.attach_rel_id = t.tid
GROUP BY t.tid
") or die(mysql_error());