How to compare the already saved value of node and updated value? I want to programmatically compare a field value of a node in hook_node_update(). How can I get the already saved and the updated values?
node_save(), which invokes hook_node_update(), contains the following code.

// Load the stored entity, if any.
if (!empty($node-&gt;nid) &amp;&amp; !isset($node-&gt;original)) {
  $node-&gt;original = entity_load_unchanged('node', $node-&gt;nid);
}


So, every time a node is updated, $node-&gt;original will contain the node object before it is updated. 

To get, for example, the value the field_example field had before the update, you use the following code.

$old_value = field_get_items('node', $node-&gt;original, 'field_example');


To get the updated value for the same field, you use the following code.

$new_value = field_get_items('node', $node, 'field_example');