You are here

protected function backup_migrate_source_db_mysql::get_table_data in Backup and Migrate 7.3

Get a list of table and view data in the db.

2 calls to backup_migrate_source_db_mysql::get_table_data()
backup_migrate_source_db_mysql::_get_tables in includes/sources.db.mysql.inc
Get a list of tables in the db.
backup_migrate_source_db_mysql::_get_views in includes/sources.db.mysql.inc
Get a list of views in the db.

File

includes/sources.db.mysql.inc, line 329
Functions to handle the direct to database source.

Class

backup_migrate_source_db_mysql
A source type for backing up from database server.

Code

protected function get_table_data() {
  if (empty(static::$tableData)) {
    $tables = $this
      ->query('SHOW TABLE STATUS')
      ->fetchAll(PDO::FETCH_ASSOC);
    foreach ($tables as $table) {

      // Lowercase the keys because between Drupal 7.12 and 7.13/14 the
      // default query behavior was changed.
      // See: http://drupal.org/node/1171866
      $table = array_change_key_case($table);
      static::$tableData[$table['name']] = $table;
    }
  }
  return static::$tableData;
}