您的位置:首页 > 数据库 > SQL

为什么在tpshop中用getlastsql 打印不出来sql语句,

2017-05-19 15:32 260 查看
最后解决办法是在ThinkPHP\Library\Think\Db\Driver.class.php 去掉数据库调试模式判断

    protected function debug($start) {
if($start) {
G('queryStartTime');
}else{
$this->modelSql[$this->model] = $this->queryStr;
//$this->model = '_think_';
// 记录操作结束时间
G('queryEndTime');
trace($this->queryStr.' [ RunTime:'.G('queryStartTime','queryEndTime').'s ]','','SQL');
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐