1`获取添加或修改成功之后的数据id
$insert_id = $UserModel->attributes['id'];
2`执行原生sql
$list = Yii::$app->db->createCommand('select * from user')->queryAll();
开发常用知识点总结:
https://www.yiichina.com/topic/8274
了解更多:
1`获取添加或修改成功之后的数据id
$insert_id = $UserModel->attributes['id'];
2`执行原生sql
$list = Yii::$app->db->createCommand('select * from user')->queryAll();
开发常用知识点总结:
https://www.yiichina.com/topic/8274
了解更多:
转载于:https://www.cnblogs.com/yulongcode/p/11557454.html