eee
This commit is contained in:
+1
-11
@@ -189,7 +189,7 @@ class SqlBuilder extends Component
|
|||||||
if (is_null($value)) {
|
if (is_null($value)) {
|
||||||
return $keys;
|
return $keys;
|
||||||
}
|
}
|
||||||
if ($this->isMath($value)) {
|
if (preg_match('/^[+|-]\s\d+$/', $value)) {
|
||||||
$keys[] = $key . '=' . $key . ' ' . $value;
|
$keys[] = $key . '=' . $key . ' ' . $value;
|
||||||
} else {
|
} else {
|
||||||
$this->query->pushParam($value);
|
$this->query->pushParam($value);
|
||||||
@@ -199,16 +199,6 @@ class SqlBuilder extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $value
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function isMath(string $value): bool
|
|
||||||
{
|
|
||||||
return (bool)preg_match('/^[+|-]\s\d+$/', $value);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
* @throws
|
* @throws
|
||||||
|
|||||||
Reference in New Issue
Block a user