title: fetch best seller of a category for a particular month
body: <p>I want to get the 3 best selling item for a particular category (if there is any sold item of course) for that particular month.</p>
  
  <p>When i ran</p>
  
  <pre><code>SELECT  io.item_name,  
      COUNT(io.item_name) AS number_sold  
  FROM  category_tbl AS c   
      LEFT JOIN item_out_tbl AS io ON io.category_id = c.category_id
          AND c.category_id = '$category_id'
      LEFT JOIN sales_tbl    AS sa ON io.item_id = sa.item_id                               
          AND '$current_month'=MONTH(date_sold) 
  GROUP BY  io.item_name 
  ORDER BY number_sold DESC 
  LIMIT 3
  </code></pre>
  
  <p>I get results even though those MONTH(date_sold) are not equals to the <code>$current_month</code>, <code>'$current_month'=MONTH(date_sold)</code> is disregarded. I expect an empty result since I don't have <code>item_name</code> that match its <code>item_sold</code> for that <code>$current_month</code></p>