yii2框架获取刚插入数据库的id (原创)

    $insert_id = $UserModel->attributes['id'];

 

posted @ 2016-12-02 15:40  山上小和尚  阅读(5157)  评论(0编辑  收藏  举报