mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
记录的sql日志 添加参数绑定信息
This commit is contained in:
@@ -128,7 +128,10 @@ abstract class Driver {
|
||||
public function query($str,$bind=[]) {
|
||||
$this->initConnect(false);
|
||||
if ( !$this->_linkID ) return false;
|
||||
$this->queryStr = $str;
|
||||
$this->queryStr = $str;
|
||||
if(!empty($bind)){
|
||||
$this->queryStr .= '[ '.print_r($bind,true).' ]';
|
||||
}
|
||||
//释放前次的查询结果
|
||||
if ( !empty($this->PDOStatement) ) $this->free();
|
||||
$this->queryTimes++;
|
||||
@@ -158,6 +161,9 @@ abstract class Driver {
|
||||
$this->initConnect(true);
|
||||
if ( !$this->_linkID ) return false;
|
||||
$this->queryStr = $str;
|
||||
if(!empty($bind)){
|
||||
$this->queryStr .= '[ '.print_r($bind,true).' ]';
|
||||
}
|
||||
//释放前次的查询结果
|
||||
if ( !empty($this->PDOStatement) ) $this->free();
|
||||
$this->executeTimes++;
|
||||
|
||||
Reference in New Issue
Block a user