Finds the last time a node was changed.
$nid: The ID of a node.
A unix timestamp indicating the last time the node was changed.
function node_last_changed($nid) {
return db_query('SELECT changed FROM {node} WHERE nid = :nid', array(
':nid' => $nid,
))
->fetch()->changed;
}