Database Management
 
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 ForumsDatabasesDatabase Management

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 November 19th, 2002, 03:33 AM
smakz smakz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 42 smakz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
Send a message via ICQ to smakz
Question help on 3 table join query?

i'd like to know how to do a select statement in mysql - the mysql forum is currently down...

Problem:
I have 3 tables:

owners table, login table, and toys table

the owners table primary key is owner_id.
the login table primary key is login_id
the toys table primary key is toys_id

owner_id is a foreign key in the toys table
login_id is a foreign key in the owners table

i want the owner's "firstname and lastname" from the owner table, the "username" from the login table WHERE the owner_id in the toys table = 1.

can i do this with only one query? if so, what is the query?

Reply With Quote
  #2  
Old November 19th, 2002, 04:00 AM
smakz smakz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 42 smakz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
Send a message via ICQ to smakz
k got it...
thx for the efforts

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > help on 3 table join query?

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