mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-03 14:02:47 +08:00
参数自动绑定采用数字key 避免sqlsrv不支持的情况
This commit is contained in:
@@ -329,8 +329,8 @@ abstract class Driver {
|
||||
if(0===strpos($val,':')){
|
||||
$set[] = $this->parseKey($key).'='.$this->parseValue($val);
|
||||
}else{
|
||||
$name = md5($key);
|
||||
$set[] = $this->parseKey($key).'=:T'.$name;
|
||||
$name = count($this->bind);
|
||||
$set[] = $this->parseKey($key).'=:'.$name;
|
||||
$this->bindParam($name,$val);
|
||||
}
|
||||
}
|
||||
@@ -346,7 +346,7 @@ abstract class Driver {
|
||||
* @return void
|
||||
*/
|
||||
protected function bindParam($name,$value){
|
||||
$this->bind[':T'.$name] = $value;
|
||||
$this->bind[':'.$name] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -747,8 +747,8 @@ abstract class Driver {
|
||||
if(0===strpos($val,':')){
|
||||
$values[] = $this->parseValue($val);
|
||||
}else{
|
||||
$name = md5($key);
|
||||
$values[] = ':T'.$name;
|
||||
$name = count($this->bind);
|
||||
$values[] = ':'.$name;
|
||||
$this->bindParam($name,$val);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user