mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
修正 使用参数绑定的时候返回执行sql的BUG
This commit is contained in:
@@ -169,7 +169,9 @@ abstract class Driver
|
|||||||
$this->queryStr = $str;
|
$this->queryStr = $str;
|
||||||
if (!empty($this->bind)) {
|
if (!empty($this->bind)) {
|
||||||
$that = $this;
|
$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) {
|
if ($fetchSql) {
|
||||||
return $this->queryStr;
|
return $this->queryStr;
|
||||||
@@ -228,7 +230,9 @@ abstract class Driver
|
|||||||
$this->queryStr = $str;
|
$this->queryStr = $str;
|
||||||
if (!empty($this->bind)) {
|
if (!empty($this->bind)) {
|
||||||
$that = $this;
|
$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) {
|
if ($fetchSql) {
|
||||||
return $this->queryStr;
|
return $this->queryStr;
|
||||||
|
|||||||
Reference in New Issue
Block a user