Re: Linking tables using INNER JOIN

2002-02-21 Thread Christopher Thompson

On Thursday 21 February 2002 3:29 pm, Rick Emery wrote:
> try:
> select * from MapConfig mc LEFT JOIN ConfigString USING (id)
> LEFT JOIN ConfigInt cf on mc.id=cf.id WHERE MapConfig.layername = "Roads";

Heh.  It's been too long since I worked with SQL.

Thanks, that worked perfectly.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Linking tables using INNER JOIN

2002-02-21 Thread Rick Emery

try:
select * from MapConfig mc LEFT JOIN ConfigString USING (id) 
LEFT JOIN ConfigInt cf on mc.id=cf.id WHERE MapConfig.layername = "Roads";


-Original Message-
From: Christopher Thompson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 4:24 PM
To: [EMAIL PROTECTED]
Subject: Linking tables using INNER JOIN


I am trying to do an inner join between three tables.  Here is what I have 
tried:

select * from MapConfig LEFT JOIN ConfigString USING (id) LEFT JOIN
ConfigInt 
USING (id) WHERE MapConfig.layername = "Roads";

What I am trying to do is to pull back all rows from MapConfig associated 
with matching rows from ConfigInt and ConfigString.  What I get, though, is 
info from MapConfig and ConfigString ONLY, nothing from ConfigInt.

If I rearrange the order that ConfigString and ConfigInt appear, I get info 
from MapConfig and ConfigInt ONLY, nothing from ConfigString.

Is my SQL messed up or is there a limitation in MySQL on the number of INNER

JOINs you can do in one statement?  I suppose I could probably use a 
temporary table for this but I'd rather not.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Linking tables using INNER JOIN

2002-02-21 Thread Christopher Thompson

I am trying to do an inner join between three tables.  Here is what I have 
tried:

select * from MapConfig LEFT JOIN ConfigString USING (id) LEFT JOIN ConfigInt 
USING (id) WHERE MapConfig.layername = "Roads";

What I am trying to do is to pull back all rows from MapConfig associated 
with matching rows from ConfigInt and ConfigString.  What I get, though, is 
info from MapConfig and ConfigString ONLY, nothing from ConfigInt.

If I rearrange the order that ConfigString and ConfigInt appear, I get info 
from MapConfig and ConfigInt ONLY, nothing from ConfigString.

Is my SQL messed up or is there a limitation in MySQL on the number of INNER 
JOINs you can do in one statement?  I suppose I could probably use a 
temporary table for this but I'd rather not.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php