![](/img/trans.png)
[英]How do I link the auto-incremented id from one table to the id in another table?
[英]Getting auto incremented id's for use in link table
于尔根,是正确的,尽管我无法将他的评论标记为答案。
$conn->lastInsertId();
允许我获取最后插入的记录的ID,然后在下一个插入查询中使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.