Re: Finding a Solution To A Distinct Problem of Mine

2007-03-13 Thread John Kopanas
GROUP BY from_user_id; In your original query I think you meant to select from, not to, since to will be 1; - Original Message - From: "John Kopanas" <[EMAIL PROTECTED]> To: Sent: Sunday, March 11, 2007 12:59 PM Subject: Re: Finding a Solution To A Distinct Problem of Mi

Re: Finding a Solution To A Distinct Problem of Mine

2007-03-12 Thread Brent Baisley
be 1; - Original Message - From: "John Kopanas" <[EMAIL PROTECTED]> To: Sent: Sunday, March 11, 2007 12:59 PM Subject: Re: Finding a Solution To A Distinct Problem of Mine I think I got it: SELECT * FROM (SELECT * FROM messages ORDER BY created_at DESC) as messages

Re: Finding a Solution To A Distinct Problem of Mine

2007-03-11 Thread John Kopanas
Ok, did not work... hmmm... any other suggestions? On 3/11/07, John Kopanas <[EMAIL PROTECTED]> wrote: I think I got it: SELECT * FROM (SELECT * FROM messages ORDER BY created_at DESC) as messages WHERE to_user_id = 1 GROUP BY from_user_id; Is this the best way about it... or are their better

Re: Finding a Solution To A Distinct Problem of Mine

2007-03-11 Thread John Kopanas
I think I got it: SELECT * FROM (SELECT * FROM messages ORDER BY created_at DESC) as messages WHERE to_user_id = 1 GROUP BY from_user_id; Is this the best way about it... or are their better ways you suggest? On 3/11/07, John Kopanas <[EMAIL PROTECTED]> wrote: I have the following table: mess