The query below loads all conversations, however, I wanted to only load the conversation between two people.
SELECT * FROM msg
WHERE senderid = '{$sender}'
OR recid = '{$recipient}'
OR recid = '{$sender}'
OR senderid = '{$recipient}'
order by id asc
How would I use the AND & OR operators together? Would the following work?
SELECT * FROM msg
WHERE senderid = '{$sender}'
AND recid = '{$recipient}'
OR recid = '{$sender}'
AND senderid = '{$recipient}'
order by id asc