
November 19th, 2002, 03:33 AM
|
|
Contributing User
|
|
Join Date: Jun 2002
Posts: 42
Time spent in forums: < 1 sec
Reputation Power: 11
|
|
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?
|