Model类saveall方法支持事务

This commit is contained in:
thinkphp
2016-06-18 10:37:22 +08:00
parent 933a61467b
commit 59a2fce286
2 changed files with 12 additions and 4 deletions

View File

@@ -248,7 +248,7 @@ class Merge extends Model
}
$db->commit();
return $result;
} catch (\PDOException $e) {
} catch (\Exception $e) {
$db->rollback();
return false;
}