Home >CMS Tutorial >Empire CMS >How to call the latest members, active members and points rankings on the homepage of Sharing Empire CMS

How to call the latest members, active members and points rankings on the homepage of Sharing Empire CMS

silencement
silencementforward
2019-11-28 13:29:052230browse

How to call the latest members, active members and points rankings on the homepage of Sharing Empire CMS

The example in this article describes the method of calling the latest members, active members and points rankings on the homepage of Empire CMS. Share it with everyone for your reference. The specific implementation method is as follows:

SQL code is as follows, the latest member SQL:

code is as follows:

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.userid desc limit 10

It is recommended to study "Empirecms Tutorial

Ranking by points SQL:

The code is as follows:

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

In the tag template, [!--userpic--] is used to represent the avatar, [!--userid-- ] represents the user id, [!--username--] represents the user name.

Taking the universal tag as an example, the SQL call statement ranked by points is as follows:

[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]

I hope this article will help Everyone’s Empire CMS website building helps.

The above is the detailed content of How to call the latest members, active members and points rankings on the homepage of Sharing Empire CMS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:www.word666.com. If there is any infringement, please contact admin@php.cn delete