db_fetch_array

includes/database.pgsql.inc, line 142

Versions
4.6 – 6
db_fetch_array($result)
7
db_fetch_array(DatabaseStatementInterface $statement)

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

▾ 27 functions call 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.
block_box_get in modules/block.module
book_nodeapi in modules/book.module
Implementation of hook_nodeapi().
comment_nodeapi in modules/comment.module
Implementation of hook_nodeapi().
contact_admin_edit in modules/contact.module
Category edit page.
drupal_notify in modules/drupal.module
Sends a ping to the Drupal directory server.
hook_cron in developer/hooks/core.php
Perform periodic actions.
hook_init in developer/hooks/core.php
Perform setup tasks.
menu_edit_item_form in modules/menu.module
Present the menu item editing form.
menu_edit_menu_form in modules/menu.module
Menu callback; handle the adding/editing of a new menu.
menu_form_alter in modules/menu.module
Implementation of hook_form_alter(). Add menu item fields to the node form.
path_load in modules/path.module
Fetch a specific URL alias from the database.
poll_load in modules/poll.module
Implementation of hook_load().
profile_field_form in modules/profile.module
Menu callback: Generate a form to add/edit a user profile field.
statistics_get in modules/statistics.module
Retrieves a node's "view statistics".
system_initialize_theme_blocks in modules/system.module
Assign an initial, default set of blocks for a theme.
system_update_151 in database/updates.inc
taxonomy_get_synonyms in modules/taxonomy.module
Return an array of synonyms of the given term ID.
update_convert_table_utf8 in ./update.php
Convert a single MySQL table to UTF-8.
update_fix_access_table in ./update.php
user_admin_access_edit in modules/user.module
Menu callback: edit an access rule
user_fields in modules/user.module
_system_update_utf8 in database/updates.inc
Converts a set of tables to UTF-8 encoding.

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.