title: How can I use the clause of selection from two tables, joing them and showing the result one of them?
body: <p>I select the data from one table, but also I need to use the clause of selection of another one:</p>
  
  <p>sql &amp; php:</p>
  
  <pre><code>  $condition = "
  AND CONCAT_WS('-    ', products_description.products_id, products_attributes.products_attributes_id) = '".$product_number."' 
  OR products_description.products_id = '".$product_number."'";
  
      $show_products_query_string = "
  SELECT 
      products_description.products_id AS id,
      products_description.products_name AS product_name, 
      products.products_image AS product_image 
  FROM 
      products_description 
      LEFT JOIN products ON products_description.products_id = products.products_id  
      LEFT JOIN warehouse_products ON products_description.products_id = warehouse_products.id" . $filter.$condition;
  </code></pre>
  
  <p>In this query I need to show only what I select: id, name, image_name.</p>
  
  <p>Thank you in advance!   </p>