本帖最后由 zhouen 于 2013-8-13 14:31 编辑
source\class\block\space\block_doing.php
把- $query = C::t('home_doing')->fetch_all_by_uid_doid($uids, $bannedids, $parameter['orderby'], $startrow, $items, true, true);
复制代码 注释掉,
下面添加- if (!empty($parameter['bannedids'])) {
- $screenid = ' where doid not in ('.$parameter['bannedids'].')';
- } else {
- $screenid = '';
- }
- $datas = DB::fetch_all('select uid,max(dateline) as maxdateline from pre_home_doing'.$screenid.' group by uid order by maxdateline desc limit 10');
- $query = array();
- foreach($datas as $data){
- $uid = $data['uid'];
- $maxdateline = $data['maxdateline'];
- $sql = "select * from pre_home_doing where uid='{$uid}' and dateline='{$maxdateline}' limit 1";
- $record = mysql_fetch_array(mysql_query($sql),MYSQL_ASSOC);
- $query[] = $record;
- }
复制代码 |