cakephp del

字体大小: 中小 标准 ->行高大小: 标准

del
  string $id
  boolean $cascade


删除指定id的model对象,或者当前model对象。
如果$cascade设为true,则会级联删除当前model所关联的所有model中,设为'dependent'的model对象。删除成功返回true

 

 function testdel(){
  $this->autoRender = false;

  $date = array("Operator"=>array("loginname"=>"hailangtestaaaa","password"=>123456,"email"=>"123@qq.com"));
  $this->Operator->id = 223;
  $result =$this->Operator->del();
  echo "<pre>";
  print_r($result);
  echo "</pre>";

 }

此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/786.html