_table = 'common_myapp'; $this->_pk = 'appid'; parent::__construct(); } public function fetch_all_by_flag($flag, $glue = '=', $sort = 'ASC') { $glue = helper_util::check_glue($glue); return DB::fetch_all("SELECT * FROM %t WHERE flag{$glue}%d ORDER BY ".DB::order('displayorder', $sort), array($this->_table, $flag), $this->_pk); } } ?>