- UID
- 9700
- 在线时间
- 0 小时
- 最后登录
- 2018-2-7
- 注册时间
- 2011-7-28
- 宅魂
- 649 点
- 贡献
- 288 点
- 宅币
- 13302 枚
- 宅の石(入宅度)
- 0 块
- 元气(技能点)
- 20 点
- 活跃
- 1 ℃
- 听众
- 7
- 收听
- 0
签到天数: 1 天 连续签到: 1 天 [LV.1]初来乍到
第一章
- 积分
- 17113
|
楼主 |
发表于 2013-9-1 14:40:28
|
显示全部楼层
修改人 | Silver Bullet(9700) | 修改时间 | 2013-8-29 | 文件名 | misc_stat.php | 路径 | source/module/misc | 原代码 | [mw_shl_code=php,true] $query = C::t('forum_forum')->fetch_all_by_status(); //Modified:Silver Bullet 20130829 1250Z
[/mw_shl_code] | 现代码 | [mw_shl_code=php,true] $query = C::t('forum_forum')->fetch_all_without_status(); //Modified:Silver Bullet 20130829 1250Z
[/mw_shl_code] | 备注 | 修改函数调用,统计管理团队的时候能统计到所有板块,与下面的函数配合 |
修改人 | 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函数取消条件判断的版本,可以查询到所有的板块 |
|
|