Re: Is this possible?
| From: | val petruchek | Date: | Wed, 06 Feb 2002 17:38:30 +0000 |
| Subject: | Re: Is this possible? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83732@lists.php.net to get a copy of this message | ||
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:val@zliypes.com.ua
----- Original Message -----
From: "Raymond Lilleodegard" <raymol@online.no>
To: <php-general@lists.php.net>
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
>
>