protected function MySQLiSource::query in Backup and Migrate 5.0.x
Run a db query on this destination's db.
Parameters
$query:
Return value
bool|\mysqli_result
Throws
\Exception
6 calls to MySQLiSource::query()
- MySQLiSource::getRawTables in src/
Core/ Source/ MySQLiSource.php - Get a list of tables in the db.
- MySQLiSource::_dumpTableSqlToFile in src/
Core/ Source/ MySQLiSource.php - Get the sql to insert the data for a given table.
- MySQLiSource::_fetchAssoc in src/
Core/ Source/ MySQLiSource.php - Return the first result of the query as an associated array.
- MySQLiSource::_getTableCreateSql in src/
Core/ Source/ MySQLiSource.php - Get the sql for the structure of the given table.
- MySQLiSource::_lockTables in src/
Core/ Source/ MySQLiSource.php - Lock the list of given tables in the database.
File
- src/
Core/ Source/ MySQLiSource.php, line 454
Class
- MySQLiSource
- @package Drupal\backup_migrate\Core\Source
Namespace
Drupal\backup_migrate\Core\SourceCode
protected function query($query) {
if ($conn = $this
->_getConnection()) {
return $conn
->query($query);
}
else {
throw new \Exception('Could not run any queries on the database as a connection could not be established');
}
}