如何统计会员在某个表发布了多少条信息 迅睿框架 更新 2019-12-25 17:37:34 小周 模板标签里面如何统计会员在某个表发布了多少条信息?{module module=news catid=1 uid=$t.uid more=1 order=displayorder_desc,updatetime num=5}uid会员在news表的catid总共发布了多少条信息?{/module }
<?php $18html_com = \Phpcmf\Service::M()->db->table('1_news')->where('uid', $t.uid)->countAll(); echo $18html_com; ?><?php $www_18html_com = \Phpcmf\Service::M()->db->table('1_news')->where('uid', $t.uid)->countAll(); echo $www_18html_com; ?><?php $www_18html_com = \Phpcmf\Service::M()->db->table('1_news')->where('uid', $t.uid)->countAll(); echo $www_18html_com; ?>这个也不行,调出来表中所有会员信息,也就是where('uid', $t.uid)无效了。{$t.uid}是能调出的,看看是哪不对?$www_18html_com = \Phpcmf\Service::M()->where("uid",$t.uid)->counts("1_news");{module module=news catid=1 uid=$t.uid more=1 order=displayorder_desc,updatetime num=5}
uid会员在news表的catid总共发布了多少条信息?
catid限最终栏目
{php echo\Phpcmf\Service::M()->db->table('1_news')->where('catid', $t.catid)->where('uid', $t.uid)->countAll();}{/module }
{php echo\Phpcmf\Service::M()->db->table('1_news')->where('catid', $t.catid)->where('uid', 1)->countAll();}直接把 $t.uid 改成 会员ID 1 测试一样无效{php echo\Phpcmf\Service::M()->db->table('1_xiutu')->where('uid', $member.uid)->countAll();}没有问题的。{php echo\Phpcmf\Service::M()->db->table('1_xiutu')->where('uid', $member.uid)->countAllResults();}ci手册里面才是统计输出