title: Merging results on a joined table
body: <p>how would I go about merging the results on the joined table if the model_name and model match? </p>
  
  <p>Table: tw</p>
  
  <pre><code>model
  customer_name
  </code></pre>
  
  <p>Table: model</p>
  
  <pre><code>model_name
  quantity
  </code></pre>
  
  <p>SQL:</p>
  
  <pre><code>SELECT DISTINCT model.model_quantity, model.model_name, tw.customer_name, tw.model FROM tw
  RIGHT OUTER JOIN model
  ON model.model_name=tw.model
  AND tw.completed = 1 AND tw.stock = 0
  ORDER BY model.id
  </code></pre>
  
  <p>I have displayed the array information as display purposes in hope it will help make sense of how the merge needs to happen.</p>
  
  <p>Currently: </p>
  
  <pre><code>STC5
  0
  Andy Baker
  Array ( [model_quantity] =&gt; 0 [model_name] =&gt; STC5 [customer_name] =&gt; Andy Baker [model] =&gt; STC5 ) 
  
  STC5
  0
  Richard Cash
  Array ( [model_quantity] =&gt; 0 [model_name] =&gt; STC5 [customer_name] =&gt; Richard Cash [model] =&gt; STC5 ) 
  </code></pre>
  
  <p>Intended results one column with list of all names of matching models:</p>
  
  <pre><code>STC5
  0
  Andy Baker
  Richard Cash
  </code></pre>