discuz数据库获取用户相关信息代码 [复制链接]

moqu8 2018-4-10

1927 0
获取用户主题数、粉丝等信息代码

<!--{eval $ucthread = C::t('forum_thread')->fetch_all_by_authorid($_G['forum_thread']['authorid'], 0,8);}-->
<!--{eval $ucauthor = DB::fetch_first("SELECT `posts`,`threads`,`following` FROM ".DB::table('common_member_count')." WHERE uid = ".$_G['forum_thread']['authorid']);}-->

使用方法(在帖子列表页):
<p class="z"><span>关注</span><strong>$ucauthor['following']</strong></p>
<p class="m"><span>粉丝</span><strong>$ucauthor['follower']</strong></p>
<p class="y"><span>帖子</span><strong>$ucauthor['threads']</strong></p>



最新回复 (0)
返回
支持中心
邮箱:winkill2012@qqcom
新站优化中!部分功能尚未完善,敬请谅解!
支持中心