mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
改进写入数据的自动参数绑定
This commit is contained in:
@@ -112,8 +112,8 @@ abstract class Builder
|
|||||||
$result[$item] = $val;
|
$result[$item] = $val;
|
||||||
} else {
|
} else {
|
||||||
$key = str_replace('.', '_', $key);
|
$key = str_replace('.', '_', $key);
|
||||||
$this->query->bind($key, $val, isset($bind[$key]) ? $bind[$key] : PDO::PARAM_STR);
|
$this->query->bind('__data__' . $key, $val, isset($bind[$key]) ? $bind[$key] : PDO::PARAM_STR);
|
||||||
$result[$item] = ':' . $key;
|
$result[$item] = ':__data__' . $key;
|
||||||
}
|
}
|
||||||
} elseif (is_object($val) && method_exists($val, '__toString')) {
|
} elseif (is_object($val) && method_exists($val, '__toString')) {
|
||||||
// 对象数据写入
|
// 对象数据写入
|
||||||
|
|||||||
Reference in New Issue
Block a user