Let prices(id,price etc.) be table of prices, products(NUM,name etc). Try smth like this:
SELECT DISTINCT * FROM PRODUCTS P, PRICES P1, PRICES P2 WHERE P.NUM=P1.ID AND P.NUM=P2.ID AND P1.SIZE=SIZE1 AND P2.SIZE=P2 Valentin Petruchek (aki Zliy Pes) http://zliypes.com.ua mailto:[EMAIL PROTECTED] ----- Original Message ----- From: "Raymond Lilleodegard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 06, 2002 7:16 PM Subject: [PHP] Is this possible? > Hi! > > I have this tricky case, at lest for me : ) > > I'm trying to get some data out of two tables and listing the data in a > product/price site. But..... : > > I have one table with productinfo and one with prices. > And it is several columns with the same id in the pricetable, because every > product have several sizes. > > So... how do I get only one row from the "product table" and two rows from > the "price table" in one line in a page? > Is it possible? > > > > Best regards > > Raymond > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php