★Kneeling and crying for help: PHP cannot access the SQL temporary table after creating it !?★The procedure is as follows: click a link to trigger a function. select * into # tempfromA is used in the function, and select * from # temp can display the content in # temp. Click a link again to trigger a function. only select * from # temp is used in the function. the returned result cannot be displayed # t★Kneeling and crying for help: PHP cannot access the SQL temporary table after creating it !?★
The procedure is as follows:
Click A link to trigger A function. select * into # temp from A. and select * from # temp
The returned result shows the content in # temp.
Click a link again to trigger a function. only select * from # temp is used in the function.
The returned result cannot be displayed in # temp. After debugging, it is found that # temp does not exist in the database.
1. why? # Isn't temp at the session level?
2. I changed to # temp global temporary table, which is also lost like # temp.
3. what should I do if I want to put the results of regular queries in the temporary table and reduce the time consumption when I wait for the next query?
------ Solution --------------------
Discussion
If you want to put the results of regular queries into a temporary table and wait for the next query to reduce the time consumption, what should you do?