-0987
-Original Message-
From: shawn.gr...@sun.com [mailto:shawn.gr...@sun.com]
Sent: December 12, 2009 4:39 PM
To: Terry Van de Velde
Cc: mysql@lists.mysql.com
Subject: Re: Multiple joins from same table?
Terry Van de Velde wrote:
> Good Day,
>
> I am attempting to do something new (to
Terry Van de Velde wrote:
Good Day,
I am attempting to do something new (to me) with MySQL. I am looking to have
my query return with the value in the visitor and home columns replaced with
the corresponding team name from the teams table. schedule.visitor and
schedule.home are essentially fore
Terry Van de Velde wrote:
Good Day,
I am attempting to do something new (to me) with MySQL. I am looking to have
my query return with the value in the visitor and home columns replaced with
the corresponding team name from the teams table. schedule.visitor and
schedule.home are essentially
Yes it's legal to do multiple join. No, the way you declared you joins is not legal. At the very least it confusing. Do you want to
left join discussion, users and topics, or just memebers?
I'm not sure if MySQL would accept things in that order. I always specifically declare my joins (left or oth
4 -0500
> To: "Steffan A. Cline" <[EMAIL PROTECTED]>
> Cc:
> Subject: Re: Multiple joins
>
> Steffan A. Cline wrote:
>> What am I missing here?
>>
>> select m.*, d.discussion, d.discussion_id, u.user_id, t.topic_id
>> from forums_messages
Steffan A. Cline wrote:
What am I missing here?
select m.*, d.discussion, d.discussion_id, u.user_id, t.topic_id
from forums_messages
left join forums_members m, forums_discussions d, users u, forums_topics t
on m.topic_id = t.topic_id, t.discussion_id = d.discussion_id
where m.topic_id = "1";
Rhino wrote:
> Okay, you've convinced me that you need some Left Joins ;-)
>
> I think you'll have to use a mix of Left Joins and Inner Joins. In
> the cases where you need a row even if something doesn't exist, like
> a subject who has an address but no phone number, use a Left Join. In
> any cas
- Original Message -
From: "Marko Knezevic" <[EMAIL PROTECTED]>
To: "MySQL list" <[EMAIL PROTECTED]>; "Rhino" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 6:11 PM
Subject: Re: Multiple JOINs
> Rhino wrote:
>
> > Your des
Rhino wrote:
> Your design seems fine, although you haven't explained how the field
> and field_lookup tables join to the others so I am making some
> assumptions.
Table field_lookup has two values defined as primary keys: ID_company and
ID_field
Thus, using simple query like:
SELECT company.nam
- Original Message -
From: "Michael Stassen" <[EMAIL PROTECTED]>
To: "Rhino" <[EMAIL PROTECTED]>
Cc: "Marko Knezevic" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 4:17 PM
Subject: Re: Multiple
Rhino wrote:
- Original Message -
From: "Michael Stassen" <[EMAIL PROTECTED]>
Rhino wrote:
The other thing that strikes me as a possible problem is the '&&'
operator in the last join. I mostly use DB2 but it doesn't have this
operator so I'm not completely sure what '&&' will do in a MyS
- Original Message -
From: "Michael Stassen" <[EMAIL PROTECTED]>
To: "Rhino" <[EMAIL PROTECTED]>
Cc: "Marko Knezevic" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 3:46 PM
Subject: Re: Multiple JOINs
>
&
Rhino wrote:
The other thing that strikes me as a possible problem is the '&&' operator
in the last join. I mostly use DB2 but it doesn't have this operator so I'm
not completely sure what '&&' will do in a MySQL join. (I am familiar with
the '&&' operator in programming languages, like Java, I'v
- Original Message -
From: "Marko Knezevic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 12:53 PM
Subject: Multiple JOINs
> Hello, first i would like to greet all of you because i am new on this
list.
>
> I am working on yellowpages application and am havin
> > > I'm quite sure it does not matter if I write
> > > t_person.dperson_id = d_person.dperson_id AND
> > > or
> > > d_person.dperson_id = t_person.dperson_id AND
> > > but please tell me if it does... :o)
> >
> > Logically there is no difference, however prevailing wisdom suggests
> > th
* DL Neil
> > I'm quite sure it does not matter if I write
> > t_person.dperson_id = d_person.dperson_id AND
> > or
> > d_person.dperson_id = t_person.dperson_id AND
> > but please tell me if it does... :o)
>
> Logically there is no difference, however prevailing wisdom suggests
> that you
Hi Roger,
> consider this select statement as an example:
>
> SELECT d_person.dispname, d_title.title
> FROM d_person, d_title, s_first, s_last, t_person, l_first, l_last
> WHERE
> t_person.dperson_id = d_person.dperson_id AND
> t_person.dtitle_id = d_title.dtitle_id AND
> l_first
17 matches
Mail list logo