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

来源:互联网 发布:adobe全套软件 编辑:程序博客网 时间:2024/05/19 20:42

最后解决办法是在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');            }     }


阅读全文
0 1
原创粉丝点击