mysql - How do I merge messages using either OR or JOIN? -
i want show conversation between person , person b only.
type in facebook messages ...
the problem query returning messages , not ones between selected people.
how fix or or join?
select * msgs usr_to = 'myself' , author_msg = 'he' or author_msg = 'myself' , usr_to = 'he' order id desc limit 12
use brackets group conditions:
$mysql = mysql_query( "select * msgs (usr_to = 'myself' , author_msg = 'he') or (author_msg = 'myself' , usr_to = 'he') order id desc limit 12", $mysql );
Comments
Post a Comment