You are here

function _taxonomy_manager_tree_term_has_children in Taxonomy Manager 5

checks if a term has children

Parameters

$tid:

Return value

true, if term has children, else false

1 call to _taxonomy_manager_tree_term_has_children()
taxonomy_manager_tree_build_form in ./taxonomy_manager.module
recursive function for building nested form array with checkboxes and weight forms for each term

File

./taxonomy_manager.module, line 1845
Taxonomy Manager

Code

function _taxonomy_manager_tree_term_has_children($tid) {
  $count = db_result(db_query("SELECT COUNT(tid) FROM {term_hierarchy} WHERE parent = %d", $tid));
  if ($count == 0) {
    return false;
  }
  return true;
}