Home > Article > CMS Tutorial > How to call the dede member list is suitable for enterprises and individuals
How to call the dede member list for businesses and individuals?
dede member list call is sorted by registration time, suitable for enterprises and individuals. The relevant codes are organized as follows. Friends in need should not miss it
Recommended learning:梦Weavercms
Calling 12 corporate members sorted by registration time
The code is as follows:
{dede:sql sql='select * from dede_member where mtype="企业" order by mid limit 0,12'} <a href=../member/index.php?uid=[field:userid/] target='_blank'>[field:uname/]</a> {/dede:sql}
Calling 12 individual members sorted by registration time
The code is as follows:
{dede:sql sql='select * from dede_member where mtype="个人" order by mid limit 0,12'} <a href=../member/index.php?uid=[field:userid/] target='_blank'>[field:uname/]</a> {/dede:sql}
Detailed explanation
Using dede’s sql tag
sql statement
The code is as follows:
select * from dede_member where mtype="个人" order by mid limit 0,12 mtype="个人" 判断是否为个人类型 order by mid 按mid(注册的ID编号) 排列 limit 0,12 从第0条数据开始读取 读取12条后返回
Related calls
Call 12 of all members
The code is as follows:
{dede:sql sql='select * from dede_member order by mid limit 0,12'} <a href=../member/index.php?uid=[field:userid/] target='_blank'>[field:uname/]</a> {/dede:sql}
Call 12 of all members sorted by last login time
The code is as follows:
{dede:sql sql='select * from dede_member order by logintime limit 0,12'} <a href=../member/index.php?uid=[field:userid/] target='_blank'>[field:uname/]</a> {/dede:sql}
Retrieve 12 members who have uploaded their avatars, sort them by the last login time and display their avatars
The code is as follows:
{dede:sql sql='select * from dede_member where length(face)>0 order by logintime limit 0,12'} <a href=../member/index.php?uid=[field:userid/] target='_blank'><img src=[field:face/] /></a> {/dede:sql}
The above is the detailed content of How to call the dede member list is suitable for enterprises and individuals. For more information, please follow other related articles on the PHP Chinese website!