You are here

function _taxonomy_menu_term_count in Taxonomy menu 6.3

Same name and namespace in other branches
  1. 8 taxonomy_menu.database.inc \_taxonomy_menu_term_count()
  2. 6.2 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:

1 call to _taxonomy_menu_term_count()
taxonomy_menu_translated_menu_link_alter in ./taxonomy_menu.module
Implementation of hook_translated_menu_link_alter().

File

./taxonomy_menu.database.inc, line 44
Taxonomy Menu functions that access the db

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));
}