title: Mysql Query for multi Condition
body: <p>I was trying to make query like this:</p>
  
  <pre><code>$query= "SELECT a.virtuemart_category_id, 
     a.virtuemart_product_id, 
     b.product_name, 
     b.product_desc, 
     c.product_price, 
     d.virtuemart_media_id, 
     e.file_url 
     FROM   wgny6_virtuemart_product_categories a 
     LEFT JOIN wgny6_virtuemart_products_en_gb b 
            ON a.virtuemart_product_id = b.virtuemart_product_id 
     LEFT JOIN wgny6_virtuemart_product_prices c 
            ON b.virtuemart_product_id = c.virtuemart_product_id 
     LEFT JOIN wgny6_virtuemart_product_medias d 
            ON b.virtuemart_product_id = d.virtuemart_product_id 
     LEFT JOIN wgny6_virtuemart_medias e 
            ON d.virtuemart_media_id = e.virtuemart_media_id 
     WHERE  b.product_name IS NOT NULL";
  </code></pre>
  
  <p>But I want this will happen only if a.virtuemart_category_id= $id. But I can't figure out how I will add that condition.</p>