function drush_db_result

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

A db_result() that works consistently for any version of Drupal.

Parameters

A Database result object.:

Related topics

9 calls to drush_db_result()
drush_module_list in commands/core/drupal/environment_7.inc
Returns a list of enabled modules.
drush_module_list in commands/core/drupal/environment_6.inc
Returns a list of enabled modules.
drush_user_add_role in commands/user/user.drush.inc
Add a role to the specified user accounts.
drush_user_cancel in commands/user/user.drush.inc
Cancels a user account.
drush_user_create in commands/user/user.drush.inc
Creates a new user account.

... See full list

File

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

Code

function drush_db_result($result) {
  switch (drush_drupal_major_version()) {
    case :
      return db_result($result);
    case :
    default:
      return $result->fetchField();
  }
}