db_fetch_array & db_fetch_object have disappeared in the most current version of Drupal 7 in database.inc. I checked in the change logs and no reports of changes have been made. If I'm missing something please let me know what it has been replaced with or where I can find this information in the documentation.

Thanks!

Comments

See, http://drupal.org/update/modules/6/7, "A completely new database API has been added"

Status:Active» Closed (fixed)

Thanks! Sorry about that!

No worries eabrand, it's a question everyone who is converting D6 code to D7 constantly has to ask!

To give an example:
In Drupal 6:

<?php
    $result
= db_query('SELECT COUNT(*) AS num, DATE(FROM_UNIXTIME(access)) AS dategroup
        FROM {users}
        WHERE uid > :uid
          AND access >= :access
        GROUP BY dategroup'
, array(':uid' => 0, ':access' => $this->last_run));
    while (
$row = db_fetch_array($result)) {
     
$this->add_day_data($row['dategroup'], $row['num']);
    }
?>

becomes as follows in Drupal 7:

<?php
    $result
= db_query('SELECT COUNT(*) AS num, DATE(FROM_UNIXTIME(access)) AS dategroup
        FROM {users}
        WHERE uid > :uid
          AND access >= :access
        GROUP BY dategroup'
, array(':uid' => 0, ':access' => $this->last_run));
    foreach (
$result as $row) {
     
$this->add_day_data($row->dategroup, $row->num);
    }
?>