Commit da924ae6 by 冷斌

fix bug

parent 43fd86a6
...@@ -314,11 +314,9 @@ class AdminPaperAction extends AdministratorAction ...@@ -314,11 +314,9 @@ class AdminPaperAction extends AdministratorAction
$data['assembly_type'] = isset($_POST['assembly_type']) ? intval($_POST['assembly_type']) : 0; $data['assembly_type'] = isset($_POST['assembly_type']) ? intval($_POST['assembly_type']) : 0;
$data['best'] = isset($_POST['best']) ? intval($_POST['best']) : 0; $data['best'] = isset($_POST['best']) ? intval($_POST['best']) : 0;
$data['price'] = t($_POST['price']); $data['price'] = t($_POST['price']);
$data['attachment'] = $attache_id;
if (M('exams_paper')->where(['exams_paper_id' => $paper_id])->save($data)) { if (M('exams_paper')->where(['exams_paper_id' => $paper_id])->save($data)) {
M('exams_paper')->where(['exams_paper_id' => $paper_id])->save([
'attachment' => $attache_id
]);
$this->success('编辑成功'); $this->success('编辑成功');
} else { } else {
$this->error('编辑失败,请重新尝试'); $this->error('编辑失败,请重新尝试');
...@@ -326,10 +324,6 @@ class AdminPaperAction extends AdministratorAction ...@@ -326,10 +324,6 @@ class AdminPaperAction extends AdministratorAction
exit; exit;
} }
$paper_id = intval($_GET['paper_id']); $paper_id = intval($_GET['paper_id']);
$b = M('exams_paper')->where(['exams_paper_id' => 7])->save([
'attachment' => '123'
]);
var_dump($b, M('exams_paper')->where(['exams_paper_id' => 7])->find());
$paper = $this->mod->getPaperById($paper_id); $paper = $this->mod->getPaperById($paper_id);
if (!$paper) { if (!$paper) {
$this->jumpUrl = U('exams/AdminPaper/index'); $this->jumpUrl = U('exams/AdminPaper/index');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment