diff --git a/library/think/db/Driver.php b/library/think/db/Driver.php index aaddc795..847fe9ec 100644 --- a/library/think/db/Driver.php +++ b/library/think/db/Driver.php @@ -15,9 +15,9 @@ use PDO; use think\Config; use think\Db; use think\Debug; +use think\exception\DbBindParamException; use think\exception\DbException; use think\exception\PDOException; -use think\exception\DbBindParamException; use think\Log; abstract class Driver @@ -266,7 +266,7 @@ abstract class Driver // 判断占位符 $sql = is_numeric($key) ? substr_replace($sql, $val, strpos($sql, '?'), 1) : - str_replace(':' . $key . ' ', $val . ' ', $sql); + str_replace(':' . $key . ' ', $val . ' ', $sql . ' '); } } return $sql;