Move get system tables sql for mysql driver
This commit is contained in:
parent
138e236673
commit
f6c3e89dc6
@ -20,6 +20,7 @@
|
|||||||
class MySQL extends DB_PDO {
|
class MySQL extends DB_PDO {
|
||||||
|
|
||||||
protected $escape_char = '`';
|
protected $escape_char = '`';
|
||||||
|
protected $system_db = 'information_schema';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to MySQL Database
|
* Connect to MySQL Database
|
||||||
@ -68,23 +69,6 @@ class MySQL extends DB_PDO {
|
|||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 the number of rows returned for a SELECT query
|
||||||
*
|
*
|
||||||
|
@ -189,7 +189,8 @@ class MySQL_SQL extends DB_SQL{
|
|||||||
*/
|
*/
|
||||||
public function system_table_list()
|
public function system_table_list()
|
||||||
{
|
{
|
||||||
return FALSE;
|
return 'SELECT `TABLE_NAME` FROM `information_schema`.`TABLES`
|
||||||
|
WHERE `TABLE_SCHEMA`=\'information_schema\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user