求助帖

浏览:153 发布日期:2016/04/28 分类:求助交流 关键字: create()可以 但是save()失败 显示false
    public function update()
    {
        if (!IS_POST) {
            $model = M('new1')->find(I('id'));          
            $this->assign('model',$model);
            $this->display();
        }
        if (IS_POST) {
            $model = D("new1");
            if (!$model->create()) {
                $this->error($model->getError());
            }else{
             //   dd(I());die;
                $ss=$model->save();
                if ($ss) {
                    $this->success("更新成功", U('new/index'));
                } else {
                    $this->error($model->getDbError());
                }        
            }
        }
    }
最佳答案
评论( 相关
后面还有条评论,点击查看>>