function drush_db_fetch_object

8.0.x dbtng.inc drush_db_fetch_object($result)
6.x dbtng.inc drush_db_fetch_object($result)
7.x dbtng.inc drush_db_fetch_object($result)
3.x drush.inc drush_db_fetch_object($result)
4.x drush.inc drush_db_fetch_object($result)
5.x dbtng.inc drush_db_fetch_object($result)
master dbtng.inc drush_db_fetch_object($result)

A db_fetch_object() that works for any version of Drupal.

Parameters

A Database result object.:

Related topics

5 calls to drush_db_fetch_object()
drush_core_watchdog_show_many in commands/core/watchdog.drush.inc
Print a table of watchdog messages.
drush_core_watchdog_show_one in commands/core/watchdog.drush.inc
Print a watchdog message.
drush_get_named_extensions_list in commands/core/drupal/environment_7.inc
Return a list of extensions from a list of named extensions. Both enabled and disabled/uninstalled extensions are returned.
drush_get_named_extensions_list in commands/core/drupal/environment_6.inc
Return a list of extensions from a list of named extensions. Both enabled and disabled/uninstalled extensions are returned.
_drush_user_get_uid in commands/user/user.drush.inc
Get uid(s) from a uid, user name, or email address. Returns a uid, or FALSE if none found.

File

includes/dbtng.inc, line 188
Wrappers to abstract database operations from Drupal version.

Code

function drush_db_fetch_object($result) {
  return drush_drupal_major_version() >=  ? $result->fetchObject() : db_fetch_object($result);
}