How can I retrieve a last_insert_id from a specific query in a transaction?
===

I have a mysql transaction with three queries


In the third query I am trying to pull last_insert_id values from the two previous queries.

    VALUES ('".$result1[last_id]."','".$result2[last_id]."')";

But it doesn't work. Any suggestions?