Thinkphp prints the last SQL statement

Source: Internet
Author: User

Thinkphp printing the last SQL statement is a common usage. It is often used during code debugging. Due to its poor memory, this remark makes it easy to use later.

The following is an example record

$ Form = M ('user'); $ result = $ form-> where (array ('username' => 'www .phpernote.com ')-> select (); // The following is the method for printing this SQL statement $ form-> getLastSql ();
Articles you may be interested in
  • The last record of the volist loop in the thinkphp Template
  • Php builds a simple example of its own MVC Framework and provides ideas for your reference only
  • PHP obtains the week of the specified date, the first day of the month and the last day of the month.
  • How does php Delete the first and last elements of an array?
  • Php calculates the number of weeks in a year or January.
  • Summary of system constants in the Action controller of thinkphp
  • Summary of common system variables in Thinkphp templates
  • PHP records search engine paths and keywords

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.