thinkphp fetchSql

fetchSql() 

The implementation of the return is the result of sql statement is not executed.

It can be used to facilitate debugging sql

 

$result = M('User')->fetchSql(true)->find(1); 

Output result results: SELECT * FROM think_user where id = 1

Guess you like

Origin www.cnblogs.com/ysbl/p/12651021.html