title: How to combine two MySQL queries to show results in one table row
body: <p>I have two separate queries showing results in two tables. I want to show result in one table instead. How to make it to show this data?</p>
  
  <p>So in first line i want to have</p>
  
  <ul>
  <li>2    </li>
  <li>GE 32,768 kHz SMD</li>
  <li>12,87112</li>
  <li>Rezonator kwarcowy KX-327S 32,768 kHz 12.5pF, 20/-0,042/50K</li>
  <li>Rezonatory filtry i źródła częstotliwości > Rezonatory kwarcowe (<strong>new line added here instead of "-"</strong>)</li>
  <li>12195</li>
  <li>1</li>
  <li>1</li>
  <li>1.190000</li>
  </ul>
  
  <p>This is how it looks now. I want to add another column "<em>Nazwa kategorii</em>"</p>
  
  <p><a href="https://i.stack.imgur.com/cRla8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cRla8.jpg" alt="enter image description here"></a></p>
  
  <pre><code>&lt;?php 
      $result = mysql_query('SELECT 
          prodlang.id_product AS "idprod", 
          prodlang.name AS "nazwa", 
          prod.price AS "cena", 
          prod.minimal_quantity AS "moq", 
          prod.ean13 AS "nazwag", 
          prod.reference AS "kod", 
          prod.quantity AS "ilosc",
          prod.active AS "aktywny" 
          FROM pstest_product_lang prodlang
          INNER JOIN pstest_product prod
          ON prodlang.id_product=prod.id_product
          limit 10');
  
          while ($row = mysql_fetch_array($result)) echo('&lt;tr&gt;&lt;td&gt;'.$row['idprod'].'&lt;/td&gt;&lt;td&gt;'.$row['kod'].'&lt;/td&gt;&lt;td&gt;'.$row['nazwag'].'&lt;/td&gt;&lt;td&gt;'.$row['nazwa'].'&lt;/td&gt;&lt;td&gt; - &lt;/td&gt;&lt;td&gt;'.$row['ilosc'].'&lt;/td&gt;&lt;td&gt;'.$row['aktywny'].'&lt;/td&gt;&lt;td&gt;'.$row['moq'].'&lt;/td&gt;&lt;td&gt;'.$row['cena'].'&lt;/td&gt;&lt;/tr&gt;');
  
  ?&gt;
  &lt;?php 
      $results = mysql_query('SELECT 
          prodcat.id_product AS "idprod", 
          catlang.name AS "nazwacat" 
          FROM pstest_category_product prodcat
          INNER JOIN pstest_category_lang catlang
          ON prodcat.id_category=catlang.id_category
          ORDER BY idprod
          limit 10');
  
          while ($row = mysql_fetch_array($results)) echo('&lt;tr&gt;&lt;td&gt;'.$row['idprod'].'&lt;/td&gt;&lt;td&gt;'.$row['nazwacat'].'&lt;/td&gt;&lt;/tr&gt;');                                               
  ?&gt;
  </code></pre>