美文网首页
thinkcmf 批量删除

thinkcmf 批量删除

作者: cuihaomaster | 来源:发表于2018-06-25 14:31 被阅读0次

    代码:

    public function delete()
        {
            $param           = $this->request->param();
            if (isset($param['id'])) {
                $id           = $this->request->param('id', 0, 'intval');
                $res       = Db::table('cmf_contact')->delete($id);
                $this->success("删除成功!", '');
    
            }
            if (isset($param['ids'])) {
                $ids     = $this->request->param('ids/a');
                $res = Db::table('cmf_contact')->where(['id' => ['in', $ids]])->delete();
    
                $this->success("删除成功!", '');
            }
        }
    

    相关文章

      网友评论

          本文标题:thinkcmf 批量删除

          本文链接:https://www.haomeiwen.com/subject/qjryyftx.html