title: How can I Insert many rows into a MySQL table and return the new IDs?
body: <p>Normally I can insert a row into a MySQL table and get the <code>last_insert_id</code> back. Now, though, I want to bulk insert many rows into the table and get back an array of IDs. Does anyone know how I can do this?</p>
  
  <p>There are some similar questions, but they are not exactly the same. I don't want to insert the new ID to any temporary table; I just want to get back the array of IDs.</p>
  
  <p><a href="https://stackoverflow.com/questions/1440360/lastinsertid-from-a-bulk-insert">Can I retrieve the lastInsertId from a bulk insert?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/5054240/mysql-mulitple-row-insert-select-statement-with-last-insert-id">Mysql mulitple row insert-select statement with last_insert_id()</a></p>