I\'m having trouble finding a better way to search MySQL for a pair of values in a table. I have the value pairs in an array, and would like to duplicate the IN() function, but
SELECT * FROM foo WHERE (column1, column2) IN (('foo', 1), ('bar', 2))
This syntax may be confusing, and it may be more readable to replace it with:
SELECT * FROM foo WHERE ROW(column1, column2) IN (ROW('foo', 1), ROW('bar', 2))
I'm used to the former one, though :)