How do I merge messages using either OR or JOIN?
I want to show the conversation between person A and person B only.
Type in Facebook messages ...
The problem is that my query is returning all messages and not only the
ones between the selected people.
How do I fix this with OR or JOIN?
$mysql = mysql_query("SELECT *
FROM msgs
WHERE usr_to = 'myself' AND
author_msg = 'he' OR
author_msg = 'myself' AND
usr_to = 'he'
ORDER BY id DESC
LIMIT 12", $mysql);
No comments:
Post a Comment