1
我是初学者zend.I不没有如何从控制器传淡水河谷在Zend的framework2.Here使用ZfcUser表更新是我的代码 在UserController.php如何从控制器传递价值,以查看Zend的framework2
公共函数doneAction()
{
$user = "4";
$planname="checking";
$billamount="$89";
$post=array("planname"=>$planname,"billamount"=>$billamount);
$service = $this->getUserService();
$service->done($user,$post);
return new ViewModel();
}
而在ZfcUser/Serivce/user.php的[为了存储在DB中的值]
公共函数来完成($用户,阵列$邮政)
{
$data=array('planname'=>$post['planname'],'billamount'=>$post['billamount']);
$where = $user->getAdapter()->quoteInto('user_id = 4');
$user->update($data, $where);
return true;
}
感谢
谢谢....其工作:) – Sheeba 2013-04-01 06:23:34