The following function returns the name of a taxonomy term based on its tid:
function get_term($tid) {
return db_select('taxonomy_term_data', 't')
->fields('t', array('name'))
->condition('tid', $tid)
->execute()
->fetchField();
}
The following function returns the name of a taxonomy term based on its tid:
function get_term($tid) {
return db_select('taxonomy_term_data', 't')
->fields('t', array('name'))
->condition('tid', $tid)
->execute()
->fetchField();
}