改进数据库驱动

This commit is contained in:
thinkphp
2017-05-16 13:54:26 +08:00
parent 2ee83fff81
commit 20216368c4
4 changed files with 8 additions and 8 deletions

View File

@@ -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'