我的统计代码如下:
$user=M('User');
$usercount=$user->field('count(id)')->group('dept')->select();
$this->assign('data1',$usercount);
$this->display();
我dump($usercount)的数据是对的,如下:
array (size=3)
0 =>
array (size=1)
'count(id)' => string '5' (length=1)
1 =>
array (size=1)
'count(id)' => string '2' (length=1)
2 =>
array (size=1)
'count(id)' => string '1' (length=1)
我通过volist展示不了啊? 输出来的仍然是<{vo1.count(id)}>而不是里面的数据,为什么?
<volist name='data1' id='vo1'>
<tr>
<td><{vo1.count(id)}>人 </td></tr>
</volist>
求助,谢谢
最佳答案