I have a collection $c
. If I write
$c->addFieldToFilter('id',array(1,2,3,4))
->addFieldToFilter('sku',array('a','b','c','d'));
The resulting SQL WHERE-part will be:
WHERE (((id = '1') OR (id = '2') OR (id = '3') OR (id = '4'))) AND (((sku = 'a') OR (sku = 'b') OR (sku = 'c') OR (sku = 'd')))
What I would need is
WHERE (id = '1' AND sku = 'a') OR (id ='2' AND sku = 'b') OR ...
Can I do this with Magento collections? How?