mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
修正EXP查询的参数绑定
This commit is contained in:
@@ -297,7 +297,7 @@ abstract class Builder
|
||||
}
|
||||
}
|
||||
$bindType = isset($binds[$field]) ? $binds[$field] : PDO::PARAM_STR;
|
||||
if (is_scalar($value) && array_key_exists($field, $binds) && !in_array($exp, ['NOT NULL', 'NULL', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN']) && strpos($exp, 'TIME') === false) {
|
||||
if (is_scalar($value) && array_key_exists($field, $binds) && !in_array($exp, ['EXP', 'NOT NULL', 'NULL', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN']) && strpos($exp, 'TIME') === false) {
|
||||
if (strpos($value, ':') !== 0 || !$this->query->isBind(substr($value, 1))) {
|
||||
$bindName = $bindName ?: 'where_' . $field;
|
||||
$this->query->bind($bindName, $value, $bindType);
|
||||
|
||||
@@ -42,6 +42,24 @@ class Redirect extends Response
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 重定向传值(通过Session)
|
||||
* @access protected
|
||||
* @param string|array $name 变量名或者数组
|
||||
* @param mixed $value 值
|
||||
* @return $this
|
||||
*/
|
||||
public function with($name, $value = null)
|
||||
{
|
||||
if (is_array($name)) {
|
||||
foreach ($name as $key => $val) {
|
||||
Session::set($key, $val);
|
||||
}
|
||||
} else {
|
||||
Session::set($name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取跳转地址
|
||||
* @return string
|
||||
|
||||
Reference in New Issue
Block a user