Skip to content

Commit 56aa950

Browse files
authored
Merge pull request #297 from alikon/patch-4
getTableList() return only tables not views
2 parents d440247 + fe71946 commit 56aa950

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Mysql/MysqlDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ public function getTableList()
486486
{
487487
$this->connect();
488488

489-
// Set the query to get the tables statement.
490-
return $this->setQuery('SHOW TABLES')->loadColumn();
489+
// Set the query to get the tables statement and not the views.
490+
return $this->setQuery('SHOW FULL TABLES WHERE table_type="BASE TABLE"')->loadColumn();
491491
}
492492

493493
/**

src/Mysqli/MysqliDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,8 @@ public function getTableList()
631631
{
632632
$this->connect();
633633

634-
// Set the query to get the tables statement.
635-
return $this->setQuery('SHOW TABLES')->loadColumn();
634+
// Set the query to get the tables statement and not the views.
635+
return $this->setQuery('SHOW FULL TABLES WHERE table_type="BASE TABLE"')->loadColumn();
636636
}
637637

638638
/**

0 commit comments

Comments
 (0)