_taxonomy_term_children
Definition
_taxonomy_term_children($tid)
modules/taxonomy.module, line 693
Description
Helper for taxonomy_term_count_nodes().
Code
<?php
function _taxonomy_term_children($tid) {
static $children;
if (!isset($children)) {
$result = db_query('SELECT tid, parent FROM {term_hierarchy}');
while ($term = db_fetch_object($result)) {
$children[$term->parent][] = $term->tid;
}
}
return $children[$tid] ? $children[$tid] : array();
}
?> 