3.2.3 - 普通 - 未处理
driver.class.php文件154行:
if(!empty($this->bind)){
$that = $this;
$this->queryStr = strtr($this->queryStr,array_map(function($val) use($that){ return '\''.$that->escapeString($val).'\''; },$this->bind));
}
当时下面继续使用pdostatement对象;
foreach ($this->bind as $key => $val) {
if(is_array($val)){
$this->PDOStatement->bindValue($key, $val[0], $val[1]);//$key是参数,$val[0]绑定值,$val[1]绑定数据类型
}else{
$this->PDOStatement->bindValue($key, $val);//不提供第三个参数的话,默认为PDO::PARAM_STR
}
}
既然下面实行参数绑定,为什么还需要154行的呢??
