You are here

function taxonomy_get_synonyms in Drupal 5

Same name and namespace in other branches
  1. 4 modules/taxonomy.module \taxonomy_get_synonyms()
  2. 6 modules/taxonomy/taxonomy.module \taxonomy_get_synonyms()

Return an array of synonyms of the given term ID.

1 call to taxonomy_get_synonyms()
taxonomy_form_term in modules/taxonomy/taxonomy.module

File

modules/taxonomy/taxonomy.module, line 1030
Enables the organization of content into categories.

Code

function taxonomy_get_synonyms($tid) {
  if ($tid) {
    $result = db_query('SELECT name FROM {term_synonym} WHERE tid = %d', $tid);
    while ($synonym = db_fetch_array($result)) {
      $synonyms[] = $synonym['name'];
    }
    return $synonyms ? $synonyms : array();
  }
  else {
    return array();
  }
}