我有一个带有 auto_incrementing 列的表,该列设置为主键。是否可以在插入活动记录后从该列中获取数字,而无需运行另一个查询?
$payment = new Model\Payment;
$payment->userId = $userId;
$payment->item = $item;
$payment->state = 'I';
$insert_id =
$payment->save();
我有一个带有 auto_incrementing 列的表,该列设置为主键。是否可以在插入活动记录后从该列中获取数字,而无需运行另一个查询?
$payment = new Model\Payment;
$payment->userId = $userId;
$payment->item = $item;
$payment->state = 'I';
$insert_id =
$payment->save();