Home  >  Article  >  CMS Tutorial  >  How to call the dede member list is suitable for enterprises and individuals

How to call the dede member list is suitable for enterprises and individuals

藏色散人
藏色散人Original
2019-12-24 09:51:252081browse

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=&#39;_blank&#39;>[field:uname/]</a> 
{/dede:sql}

Calling 12 individual members sorted by registration time

The code is as follows:

{dede:sql sql=&#39;select * from dede_member where mtype="个人" order by mid limit 0,12&#39;} 
<a href=../member/index.php?uid=[field:userid/] target=&#39;_blank&#39;>[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=&#39;select * from dede_member order by mid limit 0,12&#39;} 
<a href=../member/index.php?uid=[field:userid/] target=&#39;_blank&#39;>[field:uname/]</a> 
{/dede:sql}

Call 12 of all members sorted by last login time

The code is as follows:

{dede:sql sql=&#39;select * from dede_member order by logintime limit 0,12&#39;} 
<a href=../member/index.php?uid=[field:userid/] target=&#39;_blank&#39;>[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=&#39;select * from dede_member where length(face)>0 order by logintime limit 0,12&#39;} 
<a href=../member/index.php?uid=[field:userid/] target=&#39;_blank&#39;><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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn