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_core_find_project_path in commands/core/core.drush.inc
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.
drush_user_remove_role in commands/user/user.drush.inc
Remove a role from the specified user accounts.

... See full list

File

includes/dbtng.inc, line 167

Code

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