Answer the question
In order to leave comments, you need to log in
How can you test all arrays for common values?
There is a base
id = auto
idcontact1
idcontact2
status
It is necessary to display all records that have a pair according to this principle status = 1 and id (our = 2) is in both the first and second columns, and at the same time any id is in both line (if there is a pair according to this principle-> friends, there is no pair-> subscriber
Answer the question
In order to leave comments, you need to log in
SELECT * FROM TABLE WHILE (idcontact1 = 2 OR idcontact2 = 2) AND status = 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question