mySQL return index after insert

前端 未结 1 1295
执念已碎
执念已碎 2021-01-16 04:04

the way i have it is that I set up an insert command which works well it add the entry to my DB ...since i want to insert other entries in other tables using the unique inde

1条回答
  •  生来不讨喜
    2021-01-16 04:59

    for the autoincrement index you can use

    SELECT LAST_INSERT_ID()
    

    or mysql_insert_id() in PHP if you happen to use this language

    0 讨论(0)
提交回复
热议问题