if($node->type=='student')
{
$nid = $node->nid;
print_r("The node id is: ".$nid.'<br/>');
$tid =db_query('SELECT tid FROM {taxonomy_index} WHERE nid = :nid',
array(':nid' => $nid)
)->fetchField();
print_r('The tid is: '.$tid);exit(0);
}
I tried but nothing is displayed...I just want to get the tid.
tid != nid
its not the samedevel
module, you can outputdpm($node)
and you can find something similar to this$node->yourfield_name['und'][0]['tid']