Programming change field without calling entity_save()

Public

</> CopyGet raw version
php
  1. $node = node_load(1);
  2. $node->field_my_field[LANGUAGE_NONE][0]['value'] = 'new_value';
  3. $info = field_info_field('field_my_field');
  4. $fields = array($info['id']);
  5. field_sql_storage_field_storage_write('node', $node, 'update', $fields);
  6. cache_clear_all("field:node:$node->nid", 'cache_field');