diff --git a/library/think/db/connector/Mysql.php b/library/think/db/connector/Mysql.php index dc717532..c38181df 100644 --- a/library/think/db/connector/Mysql.php +++ b/library/think/db/connector/Mysql.php @@ -51,7 +51,7 @@ class Mysql extends Connection */ public function getFields($tableName) { - $this->initConnect(true); + $this->initConnect(false); list($tableName) = explode(' ', $tableName); if (false === strpos($tableName, '`')) { if (strpos($tableName, '.')) { @@ -91,7 +91,7 @@ class Mysql extends Connection */ public function getTables($dbName = '') { - $this->initConnect(true); + $this->initConnect(false); $sql = !empty($dbName) ? 'SHOW TABLES FROM ' . $dbName : 'SHOW TABLES '; // 调试开始 $this->debug(true); diff --git a/library/think/db/connector/Pgsql.php b/library/think/db/connector/Pgsql.php index 04c3e782..3ad78079 100644 --- a/library/think/db/connector/Pgsql.php +++ b/library/think/db/connector/Pgsql.php @@ -44,7 +44,7 @@ class Pgsql extends Connection */ public function getFields($tableName) { - $this->initConnect(true); + $this->initConnect(false); list($tableName) = explode(' ', $tableName); $sql = 'select fields_name as "field",fields_type as "type",fields_not_null as "null",fields_key_name as "key",fields_default as "default",fields_default as "extra" from table_msg(\'' . $tableName . '\');'; // 调试开始 @@ -78,7 +78,7 @@ class Pgsql extends Connection */ public function getTables($dbName = '') { - $this->initConnect(true); + $this->initConnect(false); $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 a0e0873c..1de177a1 100644 --- a/library/think/db/connector/Sqlite.php +++ b/library/think/db/connector/Sqlite.php @@ -42,7 +42,7 @@ class Sqlite extends Connection */ public function getFields($tableName) { - $this->initConnect(true); + $this->initConnect(false); list($tableName) = explode(' ', $tableName); $sql = 'PRAGMA table_info( ' . $tableName . ' )'; // 调试开始 @@ -76,7 +76,7 @@ class Sqlite extends Connection */ public function getTables($dbName = '') { - $this->initConnect(true); + $this->initConnect(false); $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 20d3491d..e9ee985b 100644 --- a/library/think/db/connector/Sqlsrv.php +++ b/library/think/db/connector/Sqlsrv.php @@ -49,7 +49,7 @@ class Sqlsrv extends Connection */ public function getFields($tableName) { - $this->initConnect(true); + $this->initConnect(false); list($tableName) = explode(' ', $tableName); $sql = "SELECT column_name, data_type, column_default, is_nullable FROM information_schema.tables AS t @@ -99,7 +99,7 @@ class Sqlsrv extends Connection */ public function getTables($dbName = '') { - $this->initConnect(true); + $this->initConnect(false); $sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'