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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should get the last insert ID first, and then inject it into the query. Assuming you’re using the
mysql_functions: