mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修正 使用参数绑定的时候返回执行sql的BUG
This commit is contained in:
@@ -169,7 +169,9 @@ abstract class Driver
|
||||
$this->queryStr = $str;
|
||||
if (!empty($this->bind)) {
|
||||
$that = $this;
|
||||
$this->queryStr = strtr($this->queryStr, array_map(function ($val) use ($that) {return $that->quote($val);}, $this->bind));
|
||||
$this->queryStr = strtr($this->queryStr, array_map(function ($val) use ($that) {
|
||||
return $that->quote(is_array($val) ? $val[0] : $val);
|
||||
}, $this->bind));
|
||||
}
|
||||
if ($fetchSql) {
|
||||
return $this->queryStr;
|
||||
@@ -228,7 +230,9 @@ abstract class Driver
|
||||
$this->queryStr = $str;
|
||||
if (!empty($this->bind)) {
|
||||
$that = $this;
|
||||
$this->queryStr = strtr($this->queryStr, array_map(function ($val) use ($that) {return $that->quote($val);}, $this->bind));
|
||||
$this->queryStr = strtr($this->queryStr, array_map(function ($val) use ($that) {
|
||||
return $that->quote(is_array($val) ? $val[0] : $val);
|
||||
}, $this->bind));
|
||||
}
|
||||
if ($fetchSql) {
|
||||
return $this->queryStr;
|
||||
|
||||
Reference in New Issue
Block a user