Why does my module only list 10 nodes? I've been creating my very first module and have got some help here earlier. Now the issue is this: my module only list a maximum of ten (10) nodes.

The module is like a taxonomy term list, which shows nodes with a certain term. Althoug I have hundreds of nodes, and they each have the correct term, no term page shows more then 10 nodes.

If one node is removed, another one gets listed, so the error is somewhere else - but where?

Shortned down code:

function my_module_cmp($a, $b) {  
  $a = (array) $a;
  $b = (array) $b;

  return strcmp($a['name'], $b['name']);
}

$term = taxonomy_term_load($tid);
$name = taxonomy_term_title($term);

drupal_set_title($name);

$terms = taxonomy_get_tree(10,0,1);

usort($terms, "my_module_cmp");

$counter = 0;
$result = taxonomy_select_nodes($tid);

foreach($result as $nid) {
  $node = node_load($nid);
  $alias = drupal_get_path_alias("node/$nid");
  $form['company_wrapper'][$nid]['title'] = array (
    '#markup' =&gt; '&lt;div class="title"&gt;&lt;a href="' . base_path() . $alias.'"&gt;' . $node-&gt;title . '&lt;/a&gt;&lt;/div&gt;',
  );

  $counter++;
}
The taxonomy_select_nodes() function has as default limit of unlimited, so if it's only returning 10 nodes, I would suspect that's all the nodes it was able to match against the provided taxonomy terms.

Note that this function will not return any unpublished nodes, nor return any nodes you do not have access to because of any node-access controlling modules.

Also note that taxonomy_select_nodes() only returns nodes that match $tid only - and not any of that term's children which might be what you are expecting.