taxonomy_get_synonym_root

5 taxonomy.module taxonomy_get_synonym_root($synonym)
6 taxonomy.module taxonomy_get_synonym_root($synonym)

Return the term object that has the given string as a synonym.

File

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

Code

function taxonomy_get_synonym_root($synonym) {
  return db_fetch_object(db_query("SELECT * FROM {term_synonym} s, {term_data} t WHERE t.tid = s.tid AND s.name = '%s'", $synonym));
}

Comments

Returns the following

Returns the following structure:

stdClass Object
(
    [tsid] =>
    [tid] =>
    [name] =>
    [vid] =>
    [description] =>
    [weight] =>
)

Login or register to post comments