摘要: 1.大规模并发写入,出现数据库锁死,数据写入失败,数据表损坏等问题 2.锁表需要配合事务使用 3.具体代码如下 M()->startTrans(); $lot_check = M()->table('order')->lock(true)->where(['id' => $id])->field(' 阅读全文
posted @ 2023-04-11 17:37 feimengv 阅读(151) 评论(0) 推荐(0) 编辑