我得到了一个唯一的sender_id和一个reciever_id我之前有一个mysql查询,比如WHERE "sender_id" AND/OR "reciever_id" LIKE "value1" AND/OR "value2"
但是我不记得它并想出来需要一些帮助;)谢谢
答案 0 :(得分:0)
不会简单地做这项工作吗?
SELECT FROM messages WHERE (sender_id=value1 AND receiver_id=value2) OR (sender_id=value2 AND receiver_id=value1)