| 修改人 | Silver Bullet(9700) |
| 修改时间 | 2013-8-29 |
| 文件名 | table_forum_forum.php |
| 路径 | source/class/table |
| 原代码 | [mw_shl_code=php,true] public function fetch_all_by_status($status, $orderby = 1) { $status = $status ? 1 : 0; $ordersql = $orderby ? 'ORDER BY t.type, t.displayorder' : ''; return DB::fetch_all('SELECT * FROM '.DB::table($this->_table)." t WHERE t.status='$status' $ordersql"); }[/mw_shl_code] |
| 现代码 | [mw_shl_code=php,true] public function fetch_all_by_status($status, $orderby = 1) { $status = $status ? 1 : 0; $ordersql = $orderby ? 'ORDER BY t.type, t.displayorder' : ''; return DB::fetch_all('SELECT * FROM '.DB::table($this->_table)." t WHERE t.status='$status' $ordersql"); } //Added by Silver Bullet at 20130829 2051ZULU //Removed restrict of function fetch_all_by_status public function fetch_all_without_status(){ return DB::fetch_all('SELECT * FROM '.DB::table($this->_table)." t ORDER BY t.type, t.displayorder"); }[/mw_shl_code] |
| 备注 | 加入新函数,是fetch_all_by_status函数取消条件判断的版本,可以查询到所有的板块 |