央企文库

首页 > 关于我们 > 资源分享

资源分享

帝国CMS插件 首页调用最新会员、活跃会员与积分排行的方法

更新时间:2021-05-18立即下载

SQL代码如下,最新会员SQL:

代码如下:

 

selecta.userid,a.username,b.userpic astitlepic fromphome_enewsmember asa LEFTJOINphome_enewsmemberadd asb ONa.userid=b.userid orderbya.userid desclimit 10

按积分排行SQL:

代码如下:

 

selecta.userid,a.username,b.userpic astitlepic fromphome_enewsmember asa LEFTJOINphome_enewsmemberadd asb ONa.userid=b.userid orderbya.userfen desclimit 10

标签模板中用[!--userpic--]表示头像[!--userid--]表示用户id[!--username--]表示用户名.

以万能标签为例,其按积分排行SQL调用语句如下:

 

[ecmsinfo]"select a.userid,a.username,b.userpic as titlepic from phome_enewsmember as a LEFT JOIN phome_enewsmemberadd as b ON a.userid=b.userid order by a.userfen desc limit 10",10,30,0,24,1,0[/ecmsinfo]

 

文章评论