thinkphp printing the last sql statement is a very common usage. It is often used in the process of debugging code. Since my memory is not very good, I will make a note here for future use.
The following is recorded through examples
$form=M('user');
$result=$form->where(array('username'=>'www.phpernote.com'))->select();
//下面就是打印这条sql语句的方法
$form->getLastSql();
Copy after login
Articles you may be interested in
- The last record of judging volist loop in thinkphp template
- php creates a simple case of your own MVC framework, providing ideas, For reference only
- PHP gets the first day and last day of the week and month of the specified date
- How to delete the first and last element of the array in php
- PHP function to calculate the current week of the year or January
- Summary of system constants in thinkphp’s Action controller
- Summary of commonly used system variables in Thinkphp templates
- PHP records the source of the search engine and the keywords entered in the search
http://www.bkjia.com/PHPjc/764099.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/764099.htmlTechArticlethinkphp printing the last sql statement is a very common usage and is often used in the process of debugging code. Since my memory is not very good, I will make a note here for future reference. Below...