You are here

protected function backup_migrate_destination_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_destination_db_mysql::get_table_data()
backup_migrate_destination_db_mysql::_get_tables in includes/destinations.db.mysql.inc
Get a list of tables in the db.
backup_migrate_destination_db_mysql::_get_views in includes/destinations.db.mysql.inc
Get a list of views in the db.

File

includes/destinations.db.mysql.inc, line 339
Functions to handle the direct to database destination.

Class

backup_migrate_destination_db_mysql
A destination type for saving to a 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;
}