Loading

tp5 新增完数据,获取id

$user                = new UserModel;
$user->user_nickname = '老狗';
$user->user_email    = 'genmaowan@163.com';
$user->save();
// 获取自增ID
halt($user->id);

返回id值

posted @ 2020-11-03 09:47  mingBolg  阅读(1978)  评论(0编辑  收藏  举报