function backup_migrate_source_db_mysql::_get_views in Backup and Migrate 8.3
Same name and namespace in other branches
- 7.3 includes/sources.db.mysql.inc \backup_migrate_source_db_mysql::_get_views()
Get a list of views in the db.
2 calls to backup_migrate_source_db_mysql::_get_views()
- backup_migrate_source_db_mysql::_backup_db_to_file in includes/
sources.db.mysql.inc - Backup the databases to a file.
- backup_migrate_source_db_mysql::_get_view_names in includes/
sources.db.mysql.inc - Get a list of views in the database.
File
- includes/
sources.db.mysql.inc, line 300 - Functions to handle the direct to database source.
Class
- backup_migrate_source_db_mysql
- A source type for backing up from database server.
Code
function _get_views() {
$out = array();
// get auto_increment values and names of all tables
$tables = $this
->query("show table status", array(), array(
'fetch' => 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);
if (empty($table['engine'])) {
$out[$table['name']] = $table;
}
}
return $out;
}