mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
修正quote问题
This commit is contained in:
@@ -153,7 +153,7 @@ 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->escapeString($val) . '\'';}, $this->bind));
|
$this->queryStr = strtr($this->queryStr, array_map(function ($val) use ($that) {return $that->escapeString($val);}, $this->bind));
|
||||||
}
|
}
|
||||||
if ($fetchSql) {
|
if ($fetchSql) {
|
||||||
return $this->queryStr;
|
return $this->queryStr;
|
||||||
@@ -213,7 +213,7 @@ 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->escapeString($val) . '\'';}, $this->bind));
|
$this->queryStr = strtr($this->queryStr, array_map(function ($val) use ($that) {return $that->escapeString($val);}, $this->bind));
|
||||||
}
|
}
|
||||||
if ($fetchSql) {
|
if ($fetchSql) {
|
||||||
return $this->queryStr;
|
return $this->queryStr;
|
||||||
@@ -454,7 +454,7 @@ abstract class Driver
|
|||||||
protected function parseValue($value)
|
protected function parseValue($value)
|
||||||
{
|
{
|
||||||
if (is_string($value)) {
|
if (is_string($value)) {
|
||||||
$value = strpos($value, ':') === 0 && in_array($value, array_keys($this->bind)) ? $this->escapeString($value) : '\'' . $this->escapeString($value) . '\'';
|
$value = strpos($value, ':') === 0 && in_array($value, array_keys($this->bind)) ? $value : $this->escapeString($value);
|
||||||
} elseif (isset($value[0]) && is_string($value[0]) && strtolower($value[0]) == 'exp') {
|
} elseif (isset($value[0]) && is_string($value[0]) && strtolower($value[0]) == 'exp') {
|
||||||
$value = $this->escapeString($value[1]);
|
$value = $this->escapeString($value[1]);
|
||||||
} elseif (is_array($value)) {
|
} elseif (is_array($value)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user