How can I view the SQL statements actually executed by mysqlpdo?

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.