title: MYSQL filter products by attributes
body: <p>How to select products which have all attributes specified by user </p>
  
  <p>For example: user specified attributes to search products: 41,2,4,6</p>
  
  <p>MYSQL structure is:</p>
  
  <p>TABLE: offer</p>
  
  <pre><code>`id` int(11) NOT NULL auto_increment,
  
  `title_pl` varchar(100) character set utf8 collate utf8_polish_ci NOT NULL,
  </code></pre>
  
  <p>TABLE: offer_att </p>
  
  <pre><code>`id` int(11) NOT NULL auto_increment,
  `offer_id` int(11) NOT NULL,
  `att_id` int(11) NOT NULL,
  </code></pre>
  
  <p>TABLE att</p>
  
  <pre><code>`id` int(11) NOT NULL auto_increment,
  
  `title_pl` varchar(255) character set utf8 collate utf8_polish_ci NOT NULL,
  </code></pre>