模型使用update静态方法后,如何判断执行是否成功?

浏览:654 发布日期:2018/05/11 分类:ThinkPHP5专区
官方源码如下:
public static function update($data = [], $where = [], $field = null)
{
$model = new static();
if (!empty($field)) {
$model->allowField($field);
}
$result = $model->isUpdate(true)->save($data, $where);
return $model;
}
这个$result没什么用嘛。
最佳答案
评论( 相关
后面还有条评论,点击查看>>