Permalink
Browse files

Move get system tables sql for mysql driver

  • Loading branch information...
1 parent 138e236 commit f6c3e89dc619bfaa062d2a048d50254f313fd278 @timw4mail timw4mail committed Apr 16, 2012
Showing with 3 additions and 18 deletions.
  1. +1 −17 drivers/mysql/mysql_driver.php
  2. +2 −1 drivers/mysql/mysql_sql.php
@@ -20,6 +20,7 @@
class MySQL extends DB_PDO {
protected $escape_char = '`';
+ protected $system_db = 'information_schema';
/**
* Connect to MySQL Database
@@ -69,23 +70,6 @@ public function truncate($table)
// --------------------------------------------------------------------------
/**
- * Returns system tables for the current database
- *
- * @return array
- */
- public function get_system_tables()
- {
- $sql = 'SELECT `TABLE_NAME` FROM `information_schema`.`TABLES`
- WHERE `TABLE_SCHEMA`=\'information_schema\'';
-
- $res = $this->query($sql);
-
- return db_filter($res->fetchAll(PDO::FETCH_ASSOC), 'TABLE_NAME');
- }
-
- // --------------------------------------------------------------------------
-
- /**
* Return the number of rows returned for a SELECT query
*
* @return int
@@ -189,7 +189,8 @@ public function table_list()
*/
public function system_table_list()
{
- return FALSE;
+ return 'SELECT `TABLE_NAME` FROM `information_schema`.`TABLES`
+ WHERE `TABLE_SCHEMA`=\'information_schema\'';
}
// --------------------------------------------------------------------------

0 comments on commit f6c3e89

Please sign in to comment.