db_fetch_object

Definition

db_fetch_object($result)
includes/database.pgsql.inc, line 126

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

<?php
function db_fetch_object($result) {
  if ($result) {
    return pg_fetch_object($result);
  }
}
?>
 
 

Drupal is a registered trademark of Dries Buytaert.