function backup_migrate_destination_db_mysql::_get_db_connection 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::_get_db_connection()
- 7.3 includes/destinations.db.mysql.inc \backup_migrate_destination_db_mysql::_get_db_connection()
- 7.2 includes/destinations.db.mysql.inc \backup_migrate_destination_db_mysql::_get_db_connection()
Get the db connection for the specified db.
Overrides backup_migrate_destination_db::_get_db_connection
2 calls to backup_migrate_destination_db_mysql::_get_db_connection()
- backup_migrate_destination_db_mysql::query in includes/
destinations.db.mysql.inc - Run a db query on this destination's db.
- backup_migrate_destination_db_mysql::_restore_db_from_file in includes/
destinations.db.mysql.inc - Backup the databases to a file.
File
- includes/
destinations.db.mysql.inc, line 428 - 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 _get_db_connection() {
if (!$this->connection) {
$this->connection = parent::_get_db_connection();
// Set the sql mode because the default is ANSI,TRADITIONAL which is not aware of collation or storage engine.
$this->connection
->exec("SET sql_mode=''");
}
return $this->connection;
}