4.6.x database.pgsql.inc db_fetch_array($result)
4.6.x database.mysql.inc db_fetch_array($result)
4.7.x database.pgsql.inc db_fetch_array($result)
4.7.x database.mysqli.inc db_fetch_array($result)
4.7.x database.mysql.inc db_fetch_array($result)
5.x database.pgsql.inc db_fetch_array($result)
5.x database.mysqli.inc db_fetch_array($result)
5.x database.mysql.inc db_fetch_array($result)
6.x database.pgsql.inc db_fetch_array($result)
6.x database.mysqli.inc db_fetch_array($result)
6.x database.mysql.inc db_fetch_array($result)

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


$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

14 calls to db_fetch_array()
aggregator_get_category in modules/aggregator.module
aggregator_get_feed in modules/aggregator.module
block_admin_configure in modules/block.module
Menu callback; displays the block configuration form.
block_box_get in modules/block.module
contact_admin_edit in modules/contact.module
Category edit page.

... See full list


includes/database.mysql.inc, line 150
Database interface code for MySQL database servers.


function db_fetch_array($result) {
  if ($result) {
    return mysql_fetch_array($result, MYSQL_ASSOC);