This question has already been answered:

There is a filter in which the user has selected the necessary.
And we got the following array:

[ 'property_id'=>8, 'value'=>2 ] [ 'property_id'=>99, 'value'=>10 ] 

And we need the first pair of values ​​to match, and the second. Those. so that there is not either the second or the first, and that both pairs are equal to the values ​​and both such rows are in the table.

Like that:

 SELECT * FROM tables WHERE (property_id=8 AND value=2) AND (property_id=99 AND value=10) 

Reported as a duplicate by members of BOPOH , Visman , Vladimir Glinskikh , Nick Volynkin , username Aug 27 '15 at 8:20 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

1 answer 1

Similar question

It seems that the questioner himself found the answer and wrote it at the end of the question.