Hi,

Mailing list: http://lists.mysql.com/

Joining three tables could be something like this.

Select * from t1 INNER JOIN t2 ON t1.id = t2.id INNER
JOIN t3 ON t2.id = t3.id

I highly recomend you to read some basic SQL books
before you carry on with your project. Trial and error
is not always the better option.

:-)

Bye and Good Luck!
--- Dj <[EMAIL PROTECTED]> wrote:
> And could not find where or if they have archives of
> the list for my to
> search though so I guess I will ask my question.
> 
> 
> I was wondering how to go about joining 3 tables. I
> figured out how to
> join 2 took me about 30 min to get it to join right,
> but I cant for the
> life of me figure out 3.
> 
> Here are the SQL statements I have tried
> 
> SELECT twc_loot_distro.*, twc_mob_loot.loot_name 
> FROM twc_loot_distro 
> INNER JOIN ( 
>               SELECT twc_loot_distro.*, twc_mob_list.mob_name
>               FROM twc_loot_distro
>               LEFT JOIN twc_mob_list
>               ON twc_loot_distro.mob_id=twc_mob_list.mob_id 
>               ) 
> ON twc_loot_distro.loot_id=twc_mob_loot.loot_id
> 
> 
> SELECT twc_loot_distro.*, twc_mob_loot.loot_name 
> FROM ( 
>       SELECT twc_loot_distro.*, twc_mob_list.mob_name
>       FROM twc_loot_distro
>       LEFT JOIN twc_mob_list
>       ON twc_loot_distro.mob_id=twc_mob_list.mob_id 
>       )
> INNER JOIN twc_mob_loot
> ON twc_loot_distro.loot_id=twc_mob_loot.loot_id
> 
> 
> 
> SELECT twc_loot_distro.*, twc_mob_list.mob_name,
> twc_mob_loot.loot_name
> FROM twc_loot_distro
> LEFT JOIN twc_mob_list, twc_mob_loot
> ON twc_loot_distro.mob_id=twc_mob_list.mob_id AND
> twc_loot_distro.loot_id=twc_mob_loot.loot_id
> 
> 
> 
> None of those worked, just gave me errors in syntax
> so obviously I am
> doing something wrong, but I don't see what.
> 
> The following join statement works
>       SELECT twc_loot_distro.*, twc_mob_list.mob_name
>       FROM twc_loot_distro
>       LEFT JOIN twc_mob_list
>       ON twc_loot_distro.mob_id=twc_mob_list.mob_id
> 
> But adding a 3rd table to that is proving much more
> complicated.
> 
> 
> 
>
---------------------------------------------------------------------
> 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
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

---------------------------------------------------------------------
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

Reply via email to