MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Mick Hanna Date:August 20 1999 4:37am
Subject:Reverse select statement
View as plain text  
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......
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;

would a join statement work?
the manual is confusing me at the moment.....

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