控制器代码如下:
public function detail(){
$cust=D('Customer');
$map['cust_id']=I('get.cust_id');
$info=$cust->where($map)->relation(true)->select();
$this->assign('info',$info);
$this->assign('empty','<td colspan=3>暂时没有数据</td>');
$this->display();
模板中代码如下:

输出结果:有信息的:

无信息的:

为何无信息的增加和删除无法出来呢
注:将外层foreach换成volist也不行
最佳答案