From 0351563c846a90111dfecfd4c9dae4f3040ea111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E5=B9=B3=E5=87=A1?= Date: Fri, 22 Jul 2016 11:13:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96builder=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index f380b563..3018e48e 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -359,7 +359,7 @@ class Query static $builder = []; $driver = $this->driver; if (!isset($builder[$driver])) { - $class = '\\think\\db\\builder\\' . ucfirst($driver); + $class = false !== strpos($driver, '\\') ? $driver : '\\think\\db\\builder\\' . ucfirst($driver); $builder[$driver] = new $class($this->connection); } // 设置当前查询对象 From b59098a559af884a412dc0a29dd13666d993ab62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E5=B9=B3=E5=87=A1?= Date: Fri, 22 Jul 2016 11:14:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9getDriverName=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Connection.php b/library/think/db/Connection.php index a45d8d3e..2e716b29 100644 --- a/library/think/db/Connection.php +++ b/library/think/db/Connection.php @@ -284,7 +284,7 @@ abstract class Connection if ($this->linkID) { return $this->linkID->getAttribute(PDO::ATTR_DRIVER_NAME); } else { - return basename(str_replace('\\', '/', $this->config['type'])); + return $this->config['type']; } }