db_fetch_array

  1. drupal
    1. 4.7
    2. 4.7 database.pgsql.inc
    3. 4.7 database.mysql.inc
    4. 5
    5. 5 database.pgsql.inc
    6. 5 database.mysql.inc
    7. 6 database.mysqli.inc
    8. 6 database.pgsql.inc
    9. 6 database.mysql.inc
Versions
4.7 – 6 db_fetch_array($result)

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

Code

includes/database.mysqli.inc, line 142

<?php
function db_fetch_array($result) {
  if ($result) {
    return mysqli_fetch_array($result, MYSQLI_ASSOC);
  }
}
?>