MySQL Forums
Forum List  »  PHP

Re: How do I make all columns line up in the same row?
Posted by: Peter Brawley
Date: March 13, 2006 09:30AM

Write a join. If the cusotmer primary key is custID and the orders PK is orderID, that would be ...

SELECT c.*. o.*, i.*
FROM customers c
INNER JOIN orders o USING (custID)
INNER JOIN items i USING (orderID);

PB

Options: ReplyQuote


Subject
Written By
Posted
Re: How do I make all columns line up in the same row?
March 13, 2006 09:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.