代码如下:
public function model(){
$user = M('User');
var_dump($user->getByFUser('大'));
echo $user->getLastsql();
}
得到的消息如下:
array (size=4)
'FID' => string '0' (length=1)
'FUser' => string '张三' (length=6)
'FEmail' => string 'zhangsan@163.com' (length=16)
'FDate' => string '2015-05-01' (length=10)
SELECT * FROM `think_user` LIMIT 1 基本 文件 流程 错误 SQL 调试 请求信息 : 2015-05-21 17:09:57 HTTP/1.1 GET : /phptest/home/User/model
运行时间 : 0.0390s ( Load:0.0110s Init:0.0030s Exec:0.0250s Template:0.0000s )
吞吐率 : 25.64req/s
内存开销 : 2,157.71 kb
查询信息 : 2 queries 0 writes
文件加载 : 27
缓存信息 : 0 gets 0 writes
配置加载 : 122
会话信息 : SESSION_ID=8h9s8jfbh3sinh8jsrel1slpc3
D:\wamp\www\PHPTEST\index.php ( 1.00 KB )
D:\wamp\www\PHPTEST\ThinkPHP\ThinkPHP.php ( 4.42 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\Think.class.php ( 12.11 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\Storage.class.php ( 1.38 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\Storage\Driver\File.class.php ( 3.54 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Mode\common.php ( 2.82 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Common\functions.php ( 45.51 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\Hook.class.php ( 4.02 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\App.class.php ( 12.57 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\Dispatcher.class.php ( 14.21 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\Route.class.php ( 13.37 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\Controller.class.php ( 10.84 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\View.class.php ( 7.44 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Behavior\BuildLiteBehavior.class.php ( 3.69 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Behavior\ParseTemplateBehavior.class.php ( 3.89 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Behavior\ContentReplaceBehavior.class.php ( 1.91 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Conf\convention.php ( 10.93 KB )
D:\wamp\www\PHPTEST\Weibo\Common\Conf\config.php ( 0.81 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Lang\zh-cn.php ( 2.50 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Conf\debug.php ( 1.50 KB )
D:\wamp\www\PHPTEST\Weibo\Home\Conf\config.php ( 0.05 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Behavior\ReadHtmlCacheBehavior.class.php ( 5.60 KB )
D:\wamp\www\PHPTEST\Weibo\Home\Controller\UserController.class.php ( 1.28 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\Model.class.php ( 58.52 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\Db.class.php ( 32.76 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Think\Db\Driver\Pdo.class.php ( 16.86 KB )
D:\wamp\www\PHPTEST\ThinkPHP\Library\Behavior\ShowPageTraceBehavior.class.php ( 5.25 KB )
[ app_init ] --START--
Run Behavior\BuildLiteBehavior [ RunTime:0.000000s ]
[ app_init ] --END-- [ RunTime:0.000000s ]
[ app_begin ] --START--
Run Behavior\ReadHtmlCacheBehavior [ RunTime:0.001000s ]
[ app_begin ] --END-- [ RunTime:0.001000s ]
[ app_end ] --START--
DESCRIBE think_user [ RunTime:0.003000s ]
SELECT * FROM `think_user` LIMIT 1 [ RunTime:0.000000s ]
最佳答案