MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Mick Hanna Date:August 20 1999 5:58am
Subject:Re: Reverse select statement
View as plain text  
yeah my eyes are a bit sore :)
my face is glowing...

----- Original Message -----
From: Don Read <dread@stripped>
To: Mick Hanna <jmmmj@stripped>
Cc: <mysql@stripped>
Sent: Thursday, August 19, 1999 7:11 AM
Subject: RE: Reverse select statement


>
> On 20-Aug-99 Mick Hanna wrote:
> > SELECT * FROM messages where username="bob" and to_user="fred";
> >
> > i want the select statement to do the reverse at the same time and mix
the
> > rows together
> > ordered by a timestamp......
> > ie:
> > one select for:
> >
> > SELECT * FROM messages where username="bob" and to_user="fred" order by
> > timestamp;
> > SELECT * FROM messages where username="fred" and to_user="bob" order by
> > timestamp;
>
> you might have been looking at it too long.
>
>  SELECT * FROM messages
>   where ( username="bob" and to_user="fred" ) or
>   ( username="fred" and to_user="bob" )
>   order by ...
>
> Regards,
> ---
> Don Read                                 dread@stripped
> EDP Manager                                  dread@stripped
> Calcasieu Lumber Co.                               Austin TX
> -- But I'm in good company, sendmail has kicked a great many
>      butts in the past
>
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread10688@stripped
>
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
>
>

Thread
Reverse select statementMick Hanna19 Aug
  • RE: Reverse select statementDon Read19 Aug
    • Re: Reverse select statementMick Hanna19 Aug
  • Reverse select statementsinisa19 Aug