diff options
Diffstat (limited to 'installer/libraries/Install_Mysqli_Driver.php')
-rw-r--r-- | installer/libraries/Install_Mysqli_Driver.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/installer/libraries/Install_Mysqli_Driver.php b/installer/libraries/Install_Mysqli_Driver.php index ce141066..43894722 100644 --- a/installer/libraries/Install_Mysqli_Driver.php +++ b/installer/libraries/Install_Mysqli_Driver.php @@ -66,5 +66,20 @@ class Install_Mysqli_Driver { return $permissions; } + public function select_db($dbname) { + $this->_mysqli->select_db($dbname); + } + + public function list_tables($dbname) { + $select = "SHOW TABLES FROM $dbname;"; + $db_tables = $this->_mysqli->query($select); + $tables = array(); + if ($db_tables) { + while ($row = $db_tables->fetch_row()) { + $tables[strtolower($row[0])] = 1; + } + } + return $tables; + } } |