PHP MySQLi insert ids from multi_query()

LyndaLee

New Member
Is there a way to get the last generated auto_increment IDs after inserting several rows with mysqli multi_query function?EDIT:I managed to get it work by adding SELECT LAST_INSERT_ID(); after each INSERT query in the multi query and then use the mysqli_use_result to get all ids, and I think this is the best way.
 
Back
Top