here is my code:
$nid = $entity->field_empf_number['und']['0']['nid'];
$result = db_query("SELECT MAX(entity_id) FROM field_data_field_empf_number WHERE field_empf_number_nid = $nid")->fetchField();
if (isset($result)){
$n = $result ;
$node = node_load($n);
$node->field_empf_stat['und']['0']['value'] = 'off'; //list field
node_save($node);
}
$entity_field[0]['value'] = $result;`
when add new node (if there is previous node i mean the if statement return true ) this error message show up:
Fatal error: Maximum function nesting level of '100' reached, aborting! in C:\wamp\www\finance\includes\database\database.inc on line 429
I googled but i did not found any answers.