db_result

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

Returns back the first result from a resource_handler.

8 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
user_edit_student_user_form_validate in modules/user/user.student.inc
Validate handler for editing student users.

... 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;
}