改进数据库驱动

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

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