The PHP official website gave a debugDumpParams (); method, but the final statement cannot be seen, I want to print the final statement and copy it to the database for execution. I can see that the PHP official website gave a debugDumpParams (); method, but I cannot see the final statement, I want to extract the final statement and copy it to the database for execution.
Reply content:
I saw a debugDumpParams (); Method on the PHP official website, but I cannot see the final statement. I want to print the final statement and copy it to the database for execution.
PDO pre-processes SQL statements. The pre-processing statements differ from the normal SQL query execution methods. In simple terms, you can regard normal SQL statements as the source code of the program, the pre-processed SQL statements are considered as compiled programs. The execution of pre-processed SQL statements can improve the query efficiency, but it should be because these statements have been processed (the processing is not simply to assemble your parameters into SQL to form a synthesis of a common SQL query, instead, you can pass in the query information and query parameters respectively. Therefore, you cannot directly view the SQL query displayed in normal mode, just as you want to see the source code by running the compiled program.