Retrieving the index of an inserted row

后端 未结 3 494
野的像风
野的像风 2021-01-16 13:27

I\'m trying to keep the database tables for a project I\'m working on nice and normalized, but I\'ve run into a problem. I\'m trying to figure out how I can insert a row int

3条回答
  •  佛祖请我去吃肉
    2021-01-16 14:13

    You could:

    A. Assume that won't be a problem and use mysql_insert_id

    or

    B. Include a timestamp in the row and retrieve the last inserted ID before inserting into another table.

提交回复
热议问题