diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-04-29 12:29:11 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-04-29 12:29:11 +0200 |
commit | 3ce4f0a83939a26c74ec990ae66af6a03ea216d6 (patch) | |
tree | 42ef4b8f8f1696dfb107b0f222b9376f5fc7b0bf /program | |
parent | b6f7304d69918e31dd701d4c041169aa05934aee (diff) |
Revert [78a58162], TABLE_SCHEMA column does not exist in mysql, also
tables in postgres can be in 'public' schema.
Diffstat (limited to 'program')
-rw-r--r-- | program/lib/Roundcube/rcube_db.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index 29f125d8a..a46df97d3 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -611,8 +611,7 @@ class rcube_db { // get tables if not cached if ($this->tables === null) { - $q = $this->query('SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = ? ORDER BY TABLE_NAME', - array($this->db_dsnw_array['database'])); + $q = $this->query('SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES ORDER BY TABLE_NAME'); if ($q) { $this->tables = $q->fetchAll(PDO::FETCH_COLUMN, 0); @@ -634,8 +633,8 @@ class rcube_db */ public function list_cols($table) { - $q = $this->query('SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ? AND TABLE_SCHEMA = ?', - array($table, $this->db_dsnw_array['database'])); + $q = $this->query('SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ?', + array($table)); if ($q) { return $q->fetchAll(PDO::FETCH_COLUMN, 0); |