update only field value without nodesave

Public

Warning message

We recommend you to assign at least one category to this snippet so you could easily navigate it in the future. Edit your snippet here.

Get raw version
php
  1. $node = node_load($nid);
  2. $field_language = field_language('node', $node, 'field_myfield');
  3. $node->field_fieldname[$field_language][0]['value'] = 'some value';
  4. field_attach_update('node', $node);
  5. resetCache(array($nid)):
  6.  
  7. entity_get_controller('node')->resetCache(array($node->nid));