_table = 'forum_forum'; $this->_pk = 'fid'; parent::__construct(); } public function fetch_all_forum_by_formula_for_plugin() { $statusql = 'f.status<>\'3\''; return DB::fetch_all("SELECT f.*, ff.*, a.uid FROM ".DB::table($this->_table)." f LEFT JOIN ".DB::table('forum_forumfield')." ff ON ff.fid=f.fid LEFT JOIN ".DB::table('forum_access')." a ON a.fid=f.fid AND a.allowview>'0' WHERE $statusql AND formulaperm<>'' ORDER BY f.type, f.displayorder"); } }