I got a unique sender_id and a reciever_id i had a mysql query before like WHERE "sender_id" AND/OR "reciever_id" LIKE "value1" AND/OR "value2"
but i cant remember it and figure it out pls need some help ;) Thanks
Asked
Active
Viewed 42 times
1 Answers
0
Won't simply doing this work?
SELECT FROM messages WHERE (sender_id=value1 AND receiver_id=value2) OR (sender_id=value2 AND receiver_id=value1)

Luca B.
- 638
- 4
- 13
-
stupid question how to implement a var in this query ? – Phil Aug 22 '14 at 08:58
-
what language are you using server-side? – Luca B. Aug 22 '14 at 09:06
-
found a solution for the var appache iam using but he didnt output me a message anyway is there another query solution ? – Phil Aug 22 '14 at 10:55