增加了错误判断
This commit is contained in:
parent
d42c9978e9
commit
29fed60dd2
|
@ -442,20 +442,19 @@ class ReviewController extends Zend_Controller_Action
|
|||
|
||||
$sql = "insert into mdreview ($keys) values ($values) RETURNING id";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
|
||||
echo '<div class="box box-success">保存成功!</div>';
|
||||
exit();
|
||||
|
||||
if($sth->execute())
|
||||
{
|
||||
echo '<div class="box box-success">保存成功!</div>';
|
||||
exit();
|
||||
}else{
|
||||
echo '<div class="box box-error">保存草稿出错,请稍后再试!</div>';
|
||||
exit();
|
||||
}
|
||||
}catch (Exception $e){
|
||||
echo '<div class="box box-error">保存失败,请重试!</div>';
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}// saveAction 存草稿 ajax
|
||||
|
||||
function searchAction()
|
||||
|
|
Loading…
Reference in New Issue