How do you retrieve the node IDs of the nodes using a a taxonomy term?
EntityFieldQuery to the rescue:

$query = new EntityFieldQuery;
$query-&gt;entityCondition('entity_type', 'node')
  -&gt;fieldCondition('field_name_of_term_reference_field', 'tid', $term_id);

$result = $query-&gt;execute();
if ($result) {
  $nids = array_keys($result['node']);
}