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
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
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.term_id
/Johan
mel list_php
: Robert Reed
To: [EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 11:12 PM
Subject: Help with Joins
Greetings.
I have a table that contains procedures and a table
that contains forms. Each procedure may have 1 or
more forms or it may have no associated forms. Each
form may be relevant
Greetings.
I have a table that contains procedures and a table
that contains forms. Each procedure may have 1 or
more forms or it may have no associated forms. Each
form may be relevant to more than 1 procedure. The
procedure table has 1 entry per procedure. The forms
table may have more than
Robert Reed wrote:
Greetings.
I have a table that contains procedures and a table
that contains forms. Each procedure may have 1 or
more forms or it may have no associated forms. Each
form may be relevant to more than 1 procedure. The
procedure table has 1 entry per procedure. The forms
table
Greetings,
I'm very new to Mysql and am trying to work with my first multi-table
database project. Here are my two table descriptions. I'm trying to
get the correct syntax for a sql query to do the following.
Display Ticket.Ticketnum,Ticket.Priority,Ticket.Title,Ticket.Status. I
assume
SEELECT t1.* FROM ticket t1,customer t2 WHERE
t1.customerid=t2.customer.id AND t2.email='[EMAIL PROTECTED]'
On Sat, 2002-12-21 at 16:52, Jim Hankins wrote:
Greetings,
I'm very new to Mysql and am trying to work with my first multi-table
database project. Here are my two table
I am having some problems getting multiple joins to work. I have the
following code:
mysql select customers.customer_id, last, first, company,
count(work_order.work_order_number) as WO
- from customers left join work_order
- on (customers.customer_id=work_order.customer_id)
- where
Hi,
I have a Oracle SQL string that contains '(+)' but when running it in mySQL I get an
error message saying that it's a syntax error.
The definition in a Oracle helpfile is:
(+),Indicates that the preceding column SELECT ename, dname
is the outer join column FROM
Jarkeborn Joacim wrote:
Hi,
I have a Oracle SQL string that contains '(+)' but when running it in mySQL I get an
error message saying that it's a syntax error.
The definition in a Oracle helpfile is:
(+),Indicates that the preceding column SELECT ename, dname
is the outer
-Original Message-
From: Van [mailto:[EMAIL PROTECTED]]
Sent: den 27 augusti 2001 11:01
To: Jarkeborn Joacim
Cc: [EMAIL PROTECTED]
Subject: Re: Help about joins
Jarkeborn Joacim wrote:
Hi,
I have a Oracle SQL string that contains '(+)' but when
running it in mySQL I
12 matches
Mail list logo