SELECT forums.forum_id AS forums.fid, forums.forum_name, forums.forum_description, posts, topics, guests_see, forum_status, forum_order FROM forums LEFT JOIN topics ON forums.fid = topics.forum_id LEFT JOIN users ON topics.topic_poster = users.user_id GROUP BY topics.topic_id AND users.username ORDER BY forums.forum_order, topics.topic_start_date DESC
mysql_error zwraca
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 '.fid, forums.forum_name, forums.forum_description, posts, topics, guests_see, fo' at line 1
Nie potrafie tego rozkiminic, probowalem juz chyba wszystkiego
Ulozylem cos takiego
SELECT f.forum_id, f.forum_name, f.forum_description, f.posts, f.topics, f.guests_see, f.forum_status, f.forum_order FROM forums f
LEFT JOIN topics
ON f.forum_id = topics.forum_id
LEFT JOIN users
ON topics.topic_poster = users.user_id
'. $sql_g .'
GROUP BY topics.topic_id AND users.username
ORDER BY f.forum_order, topics.topic_start_date DESC
Dziala tylko ze nie ma id forum zwroconego w fetch assoc (zapewne dlatego ze jest duplikat kolumny)