You are here

protected function MySQLiSource::_fetchAssoc in Backup and Migrate 8.4

Return the first result of the query as an associated array.

Parameters

string $query A SQL query.:

Return value

array

Throws

\Exception

2 calls to MySQLiSource::_fetchAssoc()
MySQLiSource::_fetchValue in lib/backup_migrate_core/src/Source/MySQLiSource.php
Return the first field of the first result of a query.
MySQLiSource::_getTableCreateSQL in lib/backup_migrate_core/src/Source/MySQLiSource.php
Get the sql for the structure of the given table.

File

lib/backup_migrate_core/src/Source/MySQLiSource.php, line 461

Class

MySQLiSource
Class MySQLiSource.

Namespace

BackupMigrate\Core\Source

Code

protected function _fetchAssoc($query) {
  $result = $this
    ->query($query);
  if ($result) {
    return $result
      ->fetch_assoc();
  }
  return [];
}