思则大道至简,疑则谜团重重!
$Model = D('Blog'); $data['id'] = 10; $data['name'] = 'update name'; $result = $Model->save($data); if ( false !== $result ){ $this->success('更新成功!'); }else{ $this->error('更新失败!'); }