db_fetch_array

Definition

db_fetch_array($result)
includes/database.pgsql.inc, line 189

Description

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

Parameters

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

Return value

An associative array representing the next row of the result, or FALSE. The keys of this object are the names of the table fields selected by the query, and the values are the field values for this result row.

Related topics

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

Code

<?php
function db_fetch_array($result) {
  if ($result) {
    return pg_fetch_assoc($result);
  }
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.