function _taxonomy_menu_get_node_terms in Taxonomy menu 6.2
Same name and namespace in other branches
- 8 taxonomy_menu.database.inc \_taxonomy_menu_get_node_terms()
- 7.2 taxonomy_menu.database.inc \_taxonomy_menu_get_node_terms()
- 7 taxonomy_menu.database.inc \_taxonomy_menu_get_node_terms()
Get an array of the tid's related to the node
Parameters
$nid:
Return value
array of tids
1 call to _taxonomy_menu_get_node_terms()
- taxonomy_menu_nodeapi in ./
taxonomy_menu.module - Implementation of hook_nodeapi().
File
- ./
taxonomy_menu.database.inc, line 75 - Database functions
Code
function _taxonomy_menu_get_node_terms($nid) {
$output = array();
$result = db_query(db_rewrite_sql('SELECT t.tid FROM {term_node} t WHERE t.nid = %d', 't', 'tid'), $nid);
while ($data = db_fetch_object($result)) {
$output[] = $data->tid;
}
return $output;
}