Here I want to fetch the nid of matching child term id from my content type product_categories
.
I used the below code.
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node');
$query->entityCondition('bundle', 'product_categories');
$query->propertyCondition('status', 1);
$query->fieldCondition('field_product_sub_cat', 'tid', $child->tid, '=');
$result = $query->execute();
I execute the above query and it displays correct results.But now I want to fetch the nid, I used below code but its not working.
$childnid = $result->nid; //Area to explore
//print "<pre>"; print_r ((int)$childnid);
print $childnid;`
can anybody please help me ??