Kim Christensen wrote:
> Hey list;
>
> Consider this statement:
>
> SELECT * FROM products p, manufactors m, items i WHERE p.manufactor_id
> = m.manufactor_id && p.product_id = i.product_id;
>
> Now, each unique product_id from "products" can have more than one
> entry in the "items" table, but I
want the latest date, then you do ORDER BY i.item_updated DESC GROUP
BY i.product_id
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Kim Christensen
Sent: Monday, June 12, 2006 9:15 PM
To: Peter Lauri
Cc: MySQL List
Subject: Re: Limiting results from join
On 6/12/06, Peter Lauri <[EMAIL PROTECTED]> wrote:
--
Here's what it looks like right now:
SELECT * FROM products p
INNER JOIN manufactors m ON m.manufactor_id = p.manufactor_id
INNER JOIN items i ON i.product_id = p.product_id
The problem is, that each entry in "produc
--
Here's what it looks like right now:
SELECT * FROM products p
INNER JOIN manufactors m ON m.manufactor_id = p.manufactor_id
INNER JOIN items i ON i.product_id = p.product_id
The problem is, that each entry in "products" may occur more than once
in "items", and they are
On 6/12/06, Barry <[EMAIL PROTECTED]> wrote:
Kim Christensen schrieb:
> Hey list;
>
> Consider this statement:
>
> SELECT * FROM products p, manufactors m, items i WHERE p.manufactor_id
> = m.manufactor_id && p.product_id = i.product_id;
>
> Now, each unique product_id from "products" can have mo
On 6/12/06, Barry <[EMAIL PROTECTED]> wrote:
Kim Christensen schrieb:
> Hey list;
>
> Consider this statement:
>
> SELECT * FROM products p, manufactors m, items i WHERE p.manufactor_id
> = m.manufactor_id && p.product_id = i.product_id;
>
> Now, each unique product_id from "products" can have mo
[EMAIL PROTECTED]
To
mysql@lists.mysql.com
cc
Subject
{Spam?} Limiting results from joins
Hey list;
Consider this statement:
SELECT * FROM products p, manufactors m, items i WHERE p.manufactor_id
= m.manufactor_id && p.product_id = i.product_id;
Now, each unique product_id from
Kim Christensen schrieb:
Hey list;
Consider this statement:
SELECT * FROM products p, manufactors m, items i WHERE p.manufactor_id
= m.manufactor_id && p.product_id = i.product_id;
Now, each unique product_id from "products" can have more than one
entry in the "items" table, but I only want to
Hey list;
Consider this statement:
SELECT * FROM products p, manufactors m, items i WHERE p.manufactor_id
= m.manufactor_id && p.product_id = i.product_id;
Now, each unique product_id from "products" can have more than one
entry in the "items" table, but I only want to fetch the one which
fullf