MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 3rd, 1999, 10:40 PM
ramr
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Ok, I'm still lost with JOINs. I have several sub-tables which I want to comglomerate with my main table. For example, let's say I have a table like this:

ID Widget1 Widget2
------------------
1 1 2
2 3 4

and another table like this:

ID Description
--------------
1 Widget1
2 Widget2
3 Widget3
4 Widget4

I want to be able to end up with a table like this:

ID Widget1 Widget2
------------------
1 Widget1 Widget2
2 Widget3 Widget4

I can get a one column version of this working by doing something like this:
SELECT tblWidgets.DESCRIPTION FROM tblItems LEFT JOIN tblWidgets ON tblItems.Widget1=tblWidgets.ID

but I can't get it to work for two or more items. Do I need to use 2 seperate select statements? I have tables where I have 4 or 5 of these situations...it seems like one statement would be very cumbersome.

dazed and confused. :-) Thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Need Help with JOIN

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap