title: MySQL query (WHERE meta_key and value)
body: <p>hello I'm doing a mysql query, which filter data by, country, year. Well, I'm joining the table items, with the meta_items table</p>
  
  <p><b>Query</b></p>
  
  <pre><code>SELECT i.id
       , i.title
       , i.permalink
      , i.description
      , i.type 
    FROM items i
       , meta_items mi 
   WHERE ((mi.meta_key = 'country' AND mi.meta_value = 'japan')  
       or (mi.meta_key = 'year' AND mi.meta_value = '2017')) 
     AND i.id = mi.item_id 
   GROUP 
      BY i.id 
   ORDER 
      BY i.time DESC
  </code></pre>
  
  <p>The problem is that the query does not show data as filtered.
  Thanks for the help !</p>