Skip to main content
fix code highlighting
Source Link
Shawn Conn
  • 26.9k
  • 15
  • 49
  • 73

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

}

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();
}
Source Link
houmem
  • 129
  • 2
  • 4

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

}