前台:

<input class="aids" type="checkbox" name="aids[]" value="895">

后台:

public function del()
    {

        $aids = isset($_REQUEST['aids']) ? $_REQUEST['aids'] : false;
//        show_bug($aids);
        if ($aids) {
            if (is_array($aids)) {
                $aids = implode(',', $aids);
                $map['order_id'] = array('in', $aids);
//                show_bug( $map);
            } else {
                $map = 'order_id=' . $aids;
            }
            if (M('order')->where($map)->delete()) {
                addlog('删除查询单,ORDER_ID:' . $aids);
                $this->success('恭喜,查询单删除成功!');
            } else {
                $this->error('参数错误!');
            }
        } else {
            $this->error('参数错误!');
        }

    }

 

posted on 2018-01-25 11:03  拉斐1982  阅读(355)  评论(0编辑  收藏  举报