I'm getting error with decisions- 7
"Fatal error: Call to undefined function db_fetch_object() in C:\xampp\htdocs\poller\sites\all\modules\decisions\decisions.module on line 81"
I read somewhere that the db_fetch_object has been removed in Drupal 7. Does anyone know how to change the following code to make Decisions work?
function decisions_cron() {
$result = db_query('SELECT d.nid FROM {decisions} d INNER JOIN {node} n ON d.nid = n.nid WHERE (d.startdate + d.runtime) < '. time() .' AND d.active = 1 AND d.runtime <> 0');
while ($decision = db_fetch_object($result)) {
db_query("UPDATE {decisions} SET active = 0 WHERE nid=%d", $decision->nid);
}
}
thanks
Comments
Comment #1
iRex CreditAttribution: iRex commented