dede会员列表调用适用于企业、个人
调用12个企业会员 按 注册时间排序
{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}
调用12个个人会员 按 注册时间排序
{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}
详解
使用dede的sql标签
sql语句
select * from dede_member where mtype="个人" order by mid limit 0,12
mtype="个人" 判断是否为个人类型
order by mid 按mid(注册的ID编号) 排列
limit 0,12 从第0条数据开始读取 读取12条后返回
相关调用
调取所有会员中的12个
{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}
调取所有会员中的12个 按最后登录时间排序
{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}
调取12个上传了头像的会员 按最后登录时间排序 并显示出他们的头像
{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}
{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}
调用12个个人会员 按 注册时间排序
{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}
详解
使用dede的sql标签
sql语句
select * from dede_member where mtype="个人" order by mid limit 0,12
mtype="个人" 判断是否为个人类型
order by mid 按mid(注册的ID编号) 排列
limit 0,12 从第0条数据开始读取 读取12条后返回
相关调用
调取所有会员中的12个
{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}
调取所有会员中的12个 按最后登录时间排序
{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}
调取12个上传了头像的会员 按最后登录时间排序 并显示出他们的头像
{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}
本文由主机测评网发布,不代表主机测评网立场,转载联系作者并注明出处:https://zhuji.jb51.net/dedecms/3685.html