You are here

function db_fetch_array in Drupal 4

Same name in this branch
  1. 4 includes/database.mysqli.inc \db_fetch_array()
  2. 4 includes/database.mysql.inc \db_fetch_array()
  3. 4 includes/database.pgsql.inc \db_fetch_array()
Same name and namespace in other branches
  1. 5 includes/database.mysqli.inc \db_fetch_array()
  2. 5 includes/database.mysql.inc \db_fetch_array()
  3. 5 includes/database.pgsql.inc \db_fetch_array()
  4. 6 includes/database.mysqli.inc \db_fetch_array()
  5. 6 includes/database.mysql.inc \db_fetch_array()
  6. 6 includes/database.pgsql.inc \db_fetch_array()

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

25 calls to db_fetch_array()
aggregator_cron in modules/aggregator.module
Implementation of hook_cron().
aggregator_get_category in modules/aggregator.module
aggregator_get_feed in modules/aggregator.module
aggregator_menu in modules/aggregator.module
Implementation of hook_menu().
block_admin_configure in modules/block.module
Menu callback; displays the block configuration form.

... See full list

File

includes/database.pgsql.inc, line 142
Database interface code for PostgreSQL database servers.

Code

function db_fetch_array($result) {
  if ($result) {
    return pg_fetch_assoc($result);
  }
}