title: Magento addAttributeToFilter problem
body: <p>Hi I have a magento site that uses categories as giftlists for people. Each category has a list_holder_1 and list_holder_2 attribute.</p>
  
  <p>I've created a form that users can search for giflists (categories) with a textbox for each attribute.</p>
  
  <p>I'm using the getModell..getCollection() method with addAttributeToFilter with like causes but I'm getting odd results.</p>
  
  <p>Here is my code..</p>
  
  <pre><code>&lt;?php $list_holder_1 = $_POST['list_holder_1']; ?&gt;
  &lt;?php $list_holder_2 = $_POST['list_holder_2']; ?&gt;
  &lt;?php $_collection = Mage::getModel('catalog/category')-&gt;getCollection();
  $_collection-&gt;addAttributeToSelect('*');
  $_collection-&gt;addAttributeToFilter(
              array(
                  array('attribute'=&gt;'list_holder_1', 'like'=&gt;'%'.$list_holder_1.'%'),
                  array('attribute'=&gt;'list_holder_1', 'like'=&gt;'%'.$list_holder_2.'%'),
              ));
  $_collection-&gt;addAttributeToFilter(
              array(
                  array('attribute'=&gt;'list_holder_2', 'like'=&gt;'%'.$list_holder_1.'%'),
                  array('attribute'=&gt;'list_holder_2', 'like'=&gt;'%'.$list_holder_2.'%'),
              ));
  echo $_collection-&gt;getSelect();
  ?&gt;
  </code></pre>
  
  <p>The user should be able to search for each name in either textbox. So my query ends up with a where clause like this:</p>
  
  <p>I have only added one name is one box - 'Hill'</p>
  
  <pre><code>WHERE (e.entity_type_id = '3') AND ((_table_list_holder_1.value like '%Hill%') OR (_table_list_holder_1.value like '%%')) AND ((_table_list_holder_2.value like '%Hill%') OR (_table_list_holder_2.value like '%%'))
  </code></pre>
  
  <p>As you can see it's checking for a blank value in both fields. And for some reason it's pulling out every category. Even though only 1 has the list_holder_1 value of 'Hill'.</p>
  
  <p>Anyone any clue as to where I've gone wrong?</p>
  
  <p>Regards,
  Billy</p>