title: How can I merge two different rows into one row?
body: <p>I have an a table, what displays one product, but with different supplier.</p>
  
  <p><a href="https://i.stack.imgur.com/2eOdW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2eOdW.png" alt="enter image description here"></a></p>
  
  <p><strong>SQL:</strong></p>
  
  <pre><code>$q=3000;    
  $sql="SELECT product_id, product_reference AS kood,product_name AS nimetus,product_quantity AS nr, pl.link_rewrite,psa.quantity as kogukogus,ps.product_supplier_reference as supp_ref,ps.product_supplier_url as supp_url, p.location AS asukoht,
           CONCAT(c.link_rewrite,'/',p.id_product,'-',pl.link_rewrite,'.html') link
          FROM ps_order_detail o
          JOIN ps_product_lang pl on o.product_id = pl.id_product
          JOIN ps_product p on p.id_product = pl.id_product
          JOIN ps_stock_available psa on p.id_product = psa.id_product
          JOIN ps_category_lang c on c.id_category = p.id_category_default
          JOIN ps_product_supplier ps on p.id_product = ps.id_product
          WHERE pl.id_lang=2 AND c.id_lang=2 AND id_order= '".$q."'";
  </code></pre>
  
  <p><strong>PHP:</strong></p>
  
  <pre><code>$rs=$ib-&gt;query($sql);
  if (PEAR::isError($rs)) die($rs-&gt;getMessage());
  
  if($rs) {
  
     while($r = $rs-&gt;fetchRow(MDB2_FETCHMODE_ASSOC)) {
         $supref=$r["supp_ref"];
         if($supref!="" || $supref!=null){
             $suppref=$supref;
         }
  
          $out .= "\n".'&lt;tr&gt;';
          //Pildi lingi leidmine
          $rs2=$ib-&gt;query("SELECT id_image FROM ps_image WHERE id_product=".$r["product_id"]." AND cover=1");
          while($r2 = $rs2-&gt;fetchRow(MDB2_FETCHMODE_ASSOC)) { $ids=$r2["id_image"]; }
              //Kui on lisame pildid
              if (!isset($_GET["ni"])) 
                  $out .= '&lt;td&gt;&lt;a href="'.getImageLink(STRIPSLASHES($r["link_rewrite"]),$ids, 'large').'"&gt;&lt;img src="'.getImageLink(STRIPSLASHES($r["link_rewrite"]),$ids, 'small').'" /&gt;&lt;/a&gt;&lt;/td&gt;';
  
              //Tabeli tekstiosa
              $out .= '&lt;td&gt;&lt;b&gt;&lt;font size=+1&gt;'.$r["kood"].'&lt;/font&gt;&lt;/b&gt; - &lt;a href="'.$vmpath.$r["link"].'" target=_new&gt;'.$r["nimetus"].'&lt;/a&gt;&lt;br&gt; '.$r["tootja_kood"].' &lt;/td&gt;&lt;td&gt;&lt;a&gt;'.$suppref.'&lt;/a&gt;&lt;/td&gt;&lt;td&gt;'.$r["nr"].'&lt;/td&gt;&lt;td&gt;'.$r["kogukogus"].'&lt;/td&gt;&lt;td&gt;&lt;b&gt;'.$r["asukoht"].'&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;';
          }
  
          $out .="\n&lt;/table&gt;\n";
      }
  </code></pre>
  
  <p><strong><em>How can I merge two different Suppliers into one column? like this:</em></strong></p>
  
  <p><a href="https://i.stack.imgur.com/1GSrm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1GSrm.png" alt="enter image description here"></a></p>