function backup_migrate_destination_db_mysql::_lock_tables in Backup and Migrate 8.3
Same name and namespace in other branches
- 8.2 includes/destinations.db.mysql.inc \backup_migrate_destination_db_mysql::_lock_tables()
- 6.2 includes/destinations.db.mysql.inc \backup_migrate_destination_db_mysql::_lock_tables()
- 7.3 includes/destinations.db.mysql.inc \backup_migrate_destination_db_mysql::_lock_tables()
- 7.2 includes/destinations.db.mysql.inc \backup_migrate_destination_db_mysql::_lock_tables()
Lock the list of given tables in the database.
Overrides backup_migrate_destination_db::_lock_tables
File
- includes/
destinations.db.mysql.inc, line 274 - Functions to handle the direct to database destination.
Class
- backup_migrate_destination_db_mysql
- A destination type for saving to a database server.
Code
function _lock_tables($tables) {
if ($tables) {
$tables_escaped = array();
foreach ($tables as $table) {
$tables_escaped[] = '`' . db_escape_table($table) . '` WRITE';
}
$this
->query('LOCK TABLES ' . implode(', ', $tables_escaped));
}
}