修改操作已经成功 为什么返回值还是操作失败呢?
来源:5-7 删除模块功能实现

BUG特攻队
2016-08-12
public function setStatus(){
try{
if($_POST){
$id = $_POST['id'];
$status = $_POST['status'];
//执行数据更新操作
$res = D('Menu')->updateStatusById($id,$status);
if($res == true){
return show(1,'操作成功');
}else{
return show(0,'操作失败');
}
}
}catch(Exception $e){
return show(0,$e->getMessage());
}
return show(0,'没有提交的数据');
}
写回答
1回答
-
BUG特攻队
提问者
2016-08-12
把==true去掉还是一样
00
相似问题