改进数据库驱动

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

@@ -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);