收藏本帖 楼主热帖
  • 去顶部
  • 234 次浏览
  • 0 次回复
  • 0 次收藏
  • 0 次点赞
  • 去底部

几个查询,记录下

  1. Seven
    新会员10个,按注册时间倒序
    1. <!--{eval $newusers = DB::fetch_all("SELECT uid,username,regdate FROM ".DB::table('common_member')." WHERE `status`= 0 ORDER BY `regdate` desc LIMIT 0,10");}-->
    2. <!--{loop $newusers $nuser}-->
    3. <a href="home.php?mod=space&uid={$nuser[uid]}" target="_blank" rel="noopener noreferrer"><img src="uc_server/avatar.php?uid={$nuser[uid]}&size=small"/>{$nuser['username']}</a>,注册于<!--{echo date("Y-m-d H:i:s",$nuser['regdate'])}-->
    4. <!--{/loop}-->
    复制代码


    积分排行10个,总积分倒序
    1. <!--{eval $user_credits = DB::fetch_all("SELECT uid,username,credits FROM ".DB::table('common_member')." WHERE `status`= 0 ORDER BY `credits` desc LIMIT 0,10");}-->
    2. <!--{loop $user_credits $cs}-->
    3. <a href="home.php?mod=space&uid={$cs[uid]}" target="_blank" rel="noopener noreferrer"><img src="uc_server/avatar.php?uid={$cs[uid]}&size=small">{$cs['username']}</a>,总积分:{$cs['credits']}
    4. <!--{/loop}-->
    复制代码

    主题列表10个,按浏览量倒序
    1. <!--{eval $thread_views = DB::fetch_all("SELECT tid,subject FROM ".DB::table('forum_thread')." ORDER BY `views` desc LIMIT 0,10");}-->
    2. <!--{loop $thread_views $view}-->
    3. <a href="forum.php?mod=viewthread&tid={$view[tid]}" target="_blank" rel="noopener noreferrer">{$view['subject']}</a>
    4. <!--{/loop}-->
    复制代码

共 0 条回复,还没有人回复,抢个沙发吧!

高级模式
您需要登录后才可以回帖 登录 | 立即注册

QQ|Archiver|小黑屋|7 talk

GMT+8, 2021-1-26 00:57 , Processed in 0.032779 second(s), 28 queries . Powered by Discuz!