I have some problem with php left join
php write me a error
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 ‘FROM ipb_topics t LEFT JOIN ipb_posts p ON p.topic_id = t.tid
LEFT JOIN ipb_at’ at line 12
and the code is
$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());
Remove the comma at the end of your field clause.