$where = array('status' => 1);
$this->view->active = $user->fetchAll($where);
$where1 = array('status' => 0);
$this->view->inactive = $user->fetchAll($where1);
在 view.phtml 中
我有这两个 foreach
foreach($this->active as $active){
echo $active->uid;
echo $active->uname;
}
foreach($this->inactive as $inactive_va){
echo $inactive_va->uid;
echo $inactive_va->uname;
}
上面的代码只返回非活动和非活动的活动记录。我必须改变这些。