From 677c4eb2fd283a17fde89ce22c7462b478c99642 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 18 Sep 2016 17:19:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/connector/Pgsql.php | 1 + library/think/db/connector/Sqlite.php | 1 + library/think/db/connector/Sqlsrv.php | 1 + 3 files changed, 3 insertions(+) diff --git a/library/think/db/connector/Pgsql.php b/library/think/db/connector/Pgsql.php index 06e08f54..6d653c14 100644 --- a/library/think/db/connector/Pgsql.php +++ b/library/think/db/connector/Pgsql.php @@ -77,6 +77,7 @@ class Pgsql extends Connection */ public function getTables($dbName = '') { + $this->initConnect(true); $sql = "select tablename as Tables_in_test from pg_tables where schemaname ='public'"; // 调试开始 $this->debug(true); diff --git a/library/think/db/connector/Sqlite.php b/library/think/db/connector/Sqlite.php index 1a52905e..95b023e5 100644 --- a/library/think/db/connector/Sqlite.php +++ b/library/think/db/connector/Sqlite.php @@ -74,6 +74,7 @@ class Sqlite extends Connection */ public function getTables($dbName = '') { + $this->initConnect(true); $sql = "SELECT name FROM sqlite_master WHERE type='table' " . "UNION ALL SELECT name FROM sqlite_temp_master " . "WHERE type='table' ORDER BY name"; diff --git a/library/think/db/connector/Sqlsrv.php b/library/think/db/connector/Sqlsrv.php index a8fc5414..18148051 100644 --- a/library/think/db/connector/Sqlsrv.php +++ b/library/think/db/connector/Sqlsrv.php @@ -99,6 +99,7 @@ class Sqlsrv extends Connection */ public function getTables($dbName = '') { + $this->initConnect(true); $sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'