function db_result

6.x db.inc db_result($res)
4.x db.inc db_result($resource_handler)
5.x db.inc db_result($res)

Returns back the first result from a resource_handler.

9 calls to db_result()
admin_display_watchdog in modules/admin/admin.module
Displays recent watchdog entries, from the watchdog table
admin_edit_degree_form_submit in modules/admin/admin.degrees.inc
db_get_user_id in includes/db.inc
Look up the user_id based on the the user_name. Returns FALSE if it cannot find it.
db_get_user_id_from_cwid in includes/db.inc
system_login_form_validate in modules/system/system.module
Validate function for the login form. This is where we will do all of the lookups to verify username and password. If you want to write your own login handler (like for LDAP) this is the function you would duplicate in a custom module, then use…

... See full list

File

includes/db.inc, line 437
This file contains mostly db shortcuts.

Code

function db_result($res) {

  if (is_object($res)) {
    return $res->fetchColumn(); // fetches the first value returned.
  }

  return NULL;
}