You are here

function _taxonomy_menu_term_count in Taxonomy menu 6.2

Same name and namespace in other branches
  1. 8 taxonomy_menu.database.inc \_taxonomy_menu_term_count()
  2. 6.3 taxonomy_menu.database.inc \_taxonomy_menu_term_count()
  3. 7.2 taxonomy_menu.database.inc \_taxonomy_menu_term_count()
  4. 7 taxonomy_menu.database.inc \_taxonomy_menu_term_count()

used to get the count without children

Parameters

$tid:

3 calls to _taxonomy_menu_term_count()
taxonomy_menu_translated_menu_link_alter in ./taxonomy_menu.module
Implementation of hook_translated_menu_link_alter().
_taxonomy_menu_children_has_nodes in ./taxonomy_menu.module
Helper function to see if any of the children have any nodes
_taxonomy_menu_item in ./taxonomy_menu.module
Helper function for insert and update hooks

File

./taxonomy_menu.database.inc, line 129
Database functions

Code

function _taxonomy_menu_term_count($tid) {
  return db_result(db_query(db_rewrite_sql('SELECT COUNT(n.nid) AS c FROM {term_node} t INNER JOIN {node} n ON t.vid = n.vid WHERE n.status = 1 AND t.tid = %d'), $tid));
}