Could not make the Query.


SELECT cat.*, f.*, fp.*, t.*, p.*, u.username , th.th_folder FROM aef_categories cat LEFT JOIN aef_forums f ON (cat.cid = f.cat_id) LEFT JOIN aef_forumpermissions fp ON (fp.fpfid = f.fid AND fp.fpugid = ) LEFT JOIN aef_posts p ON (p.post_fid = f.fid AND p.pid = f.f_last_pid) LEFT JOIN aef_topics t ON (p.post_tid = t.tid) LEFT JOIN aef_users u ON (p.poster_id = u.id) LEFT JOIN aef_themes th ON (th.thid = f.id_skin) ORDER BY cat.order ASC , f.par_board_id ASC , f.forum_order ASC

MySQL Error No : 1064

MySQL 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 ') LEFT JOIN aef_posts p ON (p.post_fid = f.fid AND p.pid = f.f_last_pid) LEF' at line 6