Could not make the Query.


SELECT cat.*, f.*, fp.*, t.*, p.*, u.username , th.th_folder FROM forumcategories cat LEFT JOIN forumforums f ON (cat.cid = f.cat_id) LEFT JOIN forumforumpermissions fp ON (fp.fpfid = f.fid AND fp.fpugid = ) LEFT JOIN forumposts p ON (p.post_fid = f.fid AND p.pid = f.f_last_pid) LEFT JOIN forumtopics t ON (p.post_tid = t.tid) LEFT JOIN forumusers u ON (p.poster_id = u.id) LEFT JOIN forumthemes 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 MariaDB server version for the right syntax to use near ') LEFT JOIN forumposts p ON (p.post_fid = f.fid AND p.pid = f.f_last_pid) ...' at line 6