diff options
Diffstat (limited to 'installer/libraries/Install_Mysql_Driver.php')
-rw-r--r-- | installer/libraries/Install_Mysql_Driver.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/installer/libraries/Install_Mysql_Driver.php b/installer/libraries/Install_Mysql_Driver.php index aac49acd..d380b140 100644 --- a/installer/libraries/Install_Mysql_Driver.php +++ b/installer/libraries/Install_Mysql_Driver.php @@ -61,4 +61,19 @@ class Install_Mysql_Driver { return $permissions; } + public function select_db($dbname) { + mysql_select_db($dbname); + } + + public function list_tables($dbname) { + $select = "SHOW TABLES FROM $dbname;"; + $db_tables = mysql_query($select, $this->_link); + $tables = array(); + if ($db_tables) { + while ($row = mysql_fetch_assoc($db_tables)) { + $tables[$row["Tables_in_$dbname"]] = 1; + } + } + return $tables; + } } |