改进参数绑定

This commit is contained in:
thinkphp
2016-01-21 11:19:09 +08:00
parent 17e0797407
commit 2c183cd77b

View File

@@ -432,8 +432,8 @@ abstract class Driver
$set[] = $this->parseKey($key) . '=' . $val; $set[] = $this->parseKey($key) . '=' . $val;
} else { } else {
$name = count($this->bind); $name = count($this->bind);
$set[] = $this->parseKey($key) . '=:' . $key . '_' . $name; $set[] = $this->parseKey($key) . '=:' . $_SERVER['REQUEST_TIME'].'_' . $name;
$this->bindParam($key . '_' . $name, $val); $this->bindParam($_SERVER['REQUEST_TIME'].'_' . $name, $val);
} }
} }
} }
@@ -912,8 +912,8 @@ abstract class Driver
$values[] = $val; $values[] = $val;
} else { } else {
$name = count($this->bind); $name = count($this->bind);
$values[] = ':' . $key . '_' . $name; $values[] = ':' . $_SERVER['REQUEST_TIME'].'_' . $name;
$this->bindParam($key . '_' . $name, $val); $this->bindParam($_SERVER['REQUEST_TIME'].'_' . $name, $val);
} }
} }
} }
@@ -954,8 +954,8 @@ abstract class Driver
$value[] = $val; $value[] = $val;
} else { } else {
$name = count($this->bind); $name = count($this->bind);
$value[] = ':' . $name; $value[] = ':' . $_SERVER['REQUEST_TIME'].'_' . $name;
$this->bindParam($name, $val); $this->bindParam($_SERVER['REQUEST_TIME'].'_' . $name, $val);
} }
} }
} }