l.com
Subject: Re: query help-multiple joins
Date: Tue, 23 May 2006 13:16:33 +0200
Hi,
I guess you should be able to do something like:
SELECT t1.term_id, t1.name, r.type_id, t2.term_id, t2.name
FROM term t1
LEFT JOIN relationTerm r ON r.term_id1 = t1.term_id
LEFT JOIN term t2 ON r.term_id2 = t2.ter
Hi,
I guess you should be able to do something like:
SELECT t1.term_id, t1.name, r.type_id, t2.term_id, t2.name
FROM term t1
LEFT JOIN relationTerm r ON r.term_id1 = t1.term_id
LEFT JOIN term t2 ON r.term_id2 = t2.term_id
/Johan
mel list_php skrev:
Hi!
I'm stuck with a join query
2 tables
Hi!
I'm stuck with a join query
2 tables, term and relation, the first one with definition of terms the
second one with the relations between them.
CREATE TABLE `term` (
`term_id` int(11) unsigned NOT NULL auto_increment,
`name` varchar(250) default NULL,
) ENGINE=MyISAM DEFAULT CHARSET