统计出来的数值 或者说用了fun得出来的数值 如何排序后显示出来?
  • 纳兰婕卿 消费19.9元 2019-06-06 18:50 18:50
636
2

比如说 收藏夹 

我统计出每个人收藏了多少篇文章

对每个人的收藏数量做了个排行

用fun得出来的这个数值 怎么排序显示呢?


<table class="show-table table table-hover table-striped"><thead>
<tr class="head"><th class="txtcenter">排名</th><th>用户</th><th>收藏数量</th></tr>
</thead>

<tbody class="ListNewfen">
{qb:tag name="pc_paihang" type="member" order="view" rows="20" id="rs"}
<tr>
<td class="rank txtcenter" width="150">
<b class="first">{$i}</b>
</td>
<td class="user-td" width="300">
<a href="{:get_url('user',['uid'=>$rs['uid']])}">
<img onerror="this.src='__STATIC__/images/nobody.gif'" src="{$rs.icon}" alt="{$rs.username}">
</a>
<span class="raknk-mame">{$rs.username}</span>
</td>
<td class="txtcenter">{:fun("count@info",'qb_fav',['uid'=>$rs.uid])}</td>
</tr>
{/qb:tag}
</tbody>
</table>



7
赏礼
赏钱
收藏
点击回复
      全部留言
  • 2
  • wr1688 风格开发者 消费:2593.25元 2019-06-06 22:56 22:56
    华为
    6楼
    你观察一下会员的数据表里面那个收藏字段
0 赏钱 赏礼回复
  • 阿赖耶识 程序开发者 消费:24.43元 2019-06-06 21:38 21:386楼

    默认的统计方法,没有做排序功能,当前只能用js处理,但是比较复杂。

0 赏钱 赏礼回复
更多回复
恢复多功能编辑器
  • 3 1
  • X1模板讨论
        圈内贴子1367
    • 圈子成员305
    本圈子内的新贴

    推荐内容
    扫一扫访问手机版
    请选择要切换的马甲:

     
    网页即时交流
    QQ咨询
    咨询热线
    020-28998648