<?php /* This is a horrible example as node.status is pulled from node_revision.status table as well, updating it here will do nothing. */ $num_updated = db_update('node') ->fields(array( 'uid' => 5, 'status' => 1, )) ->condition('created', REQUEST_TIME - 3600, '>=') ->execute(); ?>