Retrieving SELECT information from an INSERT .. SELECT mysql statement
I'm using an INSERT .. SELECT statement in mysql to copy information from one table to another but also want to retrieve that SELECT information to set certain variables in php. Is this possible in an INSERT .. SELECT statemen开发者_开发问答t? It doesn't work for me using the mysqli_fetch_array function on the resource and right now I am having to do another SELECT statement which seems kinda like an extra unnecessary step to me.
No, an INSERT
query (no matter the type) does not return a result set for you to read values from. You need to issue another SELECT
query if you want to bring rows into PHP.
精彩评论