I have the following multidimensional array, generated after some database Selects:
<?php
$array = array (
array("X"=>500, Y="400"),
array("X"=>234, Y="347"),
array("X"=>845, Y="345"),
array("X"=>264, Y="916")
);
?>
Now I need to do a select in a table where BOTH field X and Y are in the array. How to do that? Like:
SELECT FROM table WHERE
(X=500 AND Y=400) OR
(X=234 AND Y=347) OR
(X=845 AND Y=345) OR
(X=264 AND Y=916)
;
I can only find solutions here on StackOverflow for a single item in a query, but not for two values in a multidimensional array that needs to be exactly the same. Thank you!