try { $trans = \Yii::$app->db->beginTransaction(); sql操作!!! $trans->commit(); return true; } } catch (Exception $e) { $trans->rollBack(); throw $e; }
yii2事务
最新推荐文章于 2021-03-18 23:52:02 发布
try { $trans = \Yii::$app->db->beginTransaction(); sql操作!!! $trans->commit(); return true; } } catch (Exception $e) { $trans->rollBack(); throw $e; }