function _taxonomy_menu_get_vid_by_tid in Taxonomy menu 8
Same name and namespace in other branches
- 6.2 taxonomy_menu.database.inc \_taxonomy_menu_get_vid_by_tid()
- 7.2 taxonomy_menu.database.inc \_taxonomy_menu_get_vid_by_tid()
- 7 taxonomy_menu.database.inc \_taxonomy_menu_get_vid_by_tid()
Get the vocabulary for a tid
Parameters
$tid array of tids:
Return value
$vid
File
- ./
taxonomy_menu.database.inc, line 254 - Database functions.
Code
function _taxonomy_menu_get_vid_by_tid($tids) {
if ($tids) {
$result = db_select('term_data')
->condition('tid', $tids, 'IN')
->fields('term_data', array(
'vid',
))
->distinct()
->execute();
$vids = array();
return $result
->fetchAllAssoc('vid');
}
}