mybatis批量插入,怎么返回生成的自增主键

2025-03-25 19:25:37
推荐回答(1个)
回答1:

我觉得你应该在for循环里执行$this->db->insert(),然后用$this->db->insert_id()获取每一次插入后的id