Get all inserted IDs when inserting multiple rows using a single query

前端 未结 7 1026
误落风尘
误落风尘 2021-01-17 11:40

I\'ve already looked at other answers and I still feel that my question is relevant and deserves a separate entry.

I have a table named settings(which stores user se

7条回答
  •  礼貌的吻别
    2021-01-17 12:11

    I already doing this is my app. I insert records in loop and when each record is inserted i will store the Auto increment id in array by call last_insert_id(). So i can use the array of inserted id's where ever i need.

提交回复
热议问题