function drush_db_result

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

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


A Database result object.:

Related topics

3 calls to drush_db_result()
drush_module_list in commands/core/drupal/
Returns a list of enabled modules.
drush_variable_delete in commands/core/
Command callback. Delete a variable.
drush_variable_set in commands/core/
Command callback. Set a variable.


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


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