You are here

protected function MySQLiSource::_fetchValue in Backup and Migrate 5.0.x

Return the first field of the first result of a query.

Parameters

string $query: A SQL query.

Return value

null|object

Throws

\Exception

1 call to MySQLiSource::_fetchValue()
MySQLiSource::_getTableCreateSql in src/Core/Source/MySQLiSource.php
Get the sql for the structure of the given table.

File

src/Core/Source/MySQLiSource.php, line 491

Class

MySQLiSource
@package Drupal\backup_migrate\Core\Source

Namespace

Drupal\backup_migrate\Core\Source

Code

protected function _fetchValue($query) {
  $result = $this
    ->_fetchAssoc($query);
  return reset($result);
}