From 6665cc8f889ab0bf4ce0a20b1d21c9e7cc1527ec Mon Sep 17 00:00:00 2001 From: ThinkPHP Date: Sat, 27 Apr 2013 13:24:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=87=AA=E5=8A=A8=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E9=87=87=E7=94=A8=E6=95=B0=E5=AD=97key=20=E9=81=BF?= =?UTF-8?q?=E5=85=8Dsqlsrv=E4=B8=8D=E6=94=AF=E6=8C=81=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Think/Db/Driver.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Library/Think/Db/Driver.php b/Library/Think/Db/Driver.php index a609451f..c9df52f1 100644 --- a/Library/Think/Db/Driver.php +++ b/Library/Think/Db/Driver.php @@ -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); } }