Last updated April 26, 2011. Created by Jody Lynn on April 22, 2008.
Edited by MGParisi, faux_at. Log in to edit this page.
To find all related terms of a taxonomy term use this SQL code:
SELECT tid, name
FROM term_relation
INNER JOIN term_data
ON (tid1 = tid OR tid2 = tid)
WHERE (tid1 = %d OR tid2 = %d)
AND tid != %d;Replace %d to the tid (ID of taxonomy term) of which you want to find the related terms.
Comments
or, just call
or, just call http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.module/func...
www.fagioli.biz