//删除分类
public function del(){
$cid = I('get.cid');
$cate = M('category')->field('cid,pid')->select();
$cate = $this->son_cate($cate,$cid);
$cate[] = $cid;//$cate为一个数组
$where['cid'] = array('in',$cate);//cid在这个数组中,
M('category')->where($where)->delete();//$where作为条件传进来
$this->success('分类删除成功');
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2020-10-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-05
  • 2021-07-18
  • 2021-08-12
  • 2021-11-04
  • 2022-12-23
相关资源
相似解决方案