联系官方销售客服
1835022288
028-61286886
会员发稿数量自动排行:效果如下
基础代码如下: <table width="100%" border="0" cellpadding="5" cellspacing="1" > <tbody><tr> <td align="center" >排名</td> <td align="center" >单位</td> <td align="center" >总发稿数</td> <td align="center" >总采纳数</td> </tr> <?php $query=urlencode('SELECT @rownum := @rownum +1 AS zid,a.* FROM (SELECT uid,COUNT(uid) AS fawen, SUM(CASE WHEN `status`=9 THEN 1 ELSE 0 END ) AS total FROM `dr_1_news_index` GROUP BY uid ORDER BY total DESC) AS a,(SELECT @rownum :=0) AS num');?> {sql sql='$query' } {php $member = dr_member_info($t.uid);} <tr> <td height="33" align="center" >{$t.zid}</td> <td align="center" > {$member.name}</td> <td align="center" ><strong class="red">{$t.fawen}</strong>篇</td> <td align="center" ><strong class="red">{$t.total}</strong>篇</td> </tr> {/sql} </tbody></table>
学习学习
学习学习