if (isset($this->_tables) and $this->_tables) return $this->_tables;
if ($this->type == 'sqlite') {
- $sql = "SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' ORDER BY name";
+ $sql = "SELECT name FROM sqlite_master WHERE type IN('table','view') AND name NOT LIKE 'sqlite_%' ORDER BY name";
} elseif ($this->type == 'pgsql') {
$sql = "SELECT table_name FROM information_schema.tables WHERE table_type in('BASE TABLE','VIEW') AND table_schema NOT IN ('pg_catalog', 'information_schema')";