Home > CMS Tutorial > DEDECMS > 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

藏色散人
Release: 2019-12-24 09:51:25
Original
2108 people have browsed it

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}
Copy after login

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}
Copy after login

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条后返回
Copy after login

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}
Copy after login

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}
Copy after login

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}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template