Definition

db_fetch_object($result)
drupal/includes/database.mysqli.inc, line 125

Description

Fetch one result row from the previous query as an object.

Parameters

$result A database query result resource, as returned from db_query().

Return value

An object representing the next row of the result. The attributes of this object are the table fields selected by the query.

Related topics

Namesort iconDescription
Database abstraction layerAllow the use of different database servers using the same code base.

Code

function db_fetch_object($result) {
  if ($result) {
    return mysqli_fetch_object($result);
  }
}