Which table should I query? On the parent term page, I want to get all the nodes belonging to the parent term page and its children term. I need to output the node title, a field I created, and the node summary. 

Which tables should I query? Which condition should I use?

$query = new EntityFieldQuery();

$query-&gt;entityCondition('entity_type', 'node')
  -&gt;entityCondition('bundle', 'product')
  -&gt;propertyCondition('status', 1)
  // field_fenlei is the category field name.
  -&gt;fieldCondition('field_fenlei', 'tid', arg(2))
  -&gt;range(0, 10);

$result = $query-&gt;execute();

if (isset($result['node'])) {
  $nids = array_keys($result['node']);
  $nodes = entity_load('node', $nids);
  echo $nodes-&gt;title;
}
You want to specify that you searching for nodes first (and optionally by your content type), and then filter by term:

$query = new EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'node')
-&gt;entityCondition('bundle', 'YOUR_CONTENT_TYPE_HERE')
-&gt;fieldCondition('field_game', 'tid', 5);

$result = $query-&gt;execute();
$nids = array_keys($result['node']);
$nodes = entity_load('node', $nids);


How to use EntityFieldQuery