Think\Db\Connection::bindValue PHP Метод

bindValue() защищенный Метод

参数绑定 支持 ['name'=>'value','id'=>123] 对应命名占位符 或者 ['value',123] 对应问号占位符
protected bindValue ( array $bind = [] ) : void
$bind array 要绑定的参数列表
Результат void
    protected function bindValue(array $bind = [])
    {
        foreach ($bind as $key => $val) {
            // 占位符
            $param = is_numeric($key) ? $key + 1 : ':' . $key;
            if (is_array($val)) {
                $result = $this->PDOStatement->bindValue($param, $val[0], $val[1]);
            } else {
                $result = $this->PDOStatement->bindValue($param, $val);
            }
            if (!$result) {
                throw new BindParamException("Error occurred  when binding parameters '{$param}'", $this->config, $this->queryStr, $bind);
            }
        }
    }