.tables only works with the SQLite3 CLI program
http://www.sqlite.org/faq.html#q7
This commit is contained in:
parent
b1ec0c434e
commit
05cfbde372
@ -689,6 +689,7 @@ class Database {
|
||||
* @return int|null
|
||||
*/
|
||||
public function count_tables() {
|
||||
|
||||
if(is_null($this->db) || is_null($this->engine)) $this->connect_db();
|
||||
|
||||
if($this->engine->name === "mysql") {
|
||||
@ -701,7 +702,7 @@ class Database {
|
||||
);
|
||||
} else if ($this->engine->name === "sqlite") {
|
||||
return count(
|
||||
$this->get_all(".tables")
|
||||
$this->get_all("SELECT name FROM sqlite_master WHERE type = 'table'")
|
||||
);
|
||||
} else {
|
||||
// Hard to find a universal way to do this...
|
||||
|
Loading…
x
Reference in New Issue
Block a user