title: I am getting 2 rows returned when i'm really expecting one merged row, MySQL and INNER JOIN
body: <p>I have the following SQL:</p>
  
  <pre><code>    $queryString = "
          SELECT 
              c.id,
              c.object,
              c.ref,
              c.title,
              o.value
          FROM 
              organisations c
          INNER JOIN 
              organisationType oT ON
              oT.ref = c.ref 
          INNER JOIN 
              options o ON
              oT.value = o.ref
          WHERE c.ref = '585567'
          ORDER BY 
              title
      ";
  </code></pre>
  
  <ul>
  <li>My organisations table contains information about an organisation (The following is one organisation)</li>
  </ul>
  
  <blockquote>
    <p>id, dateModified, object, ref, title</p>
    
    <p>2312, 2013-04-22 17:34:55,
    {"__attributes":{"item_id":6868447,"external_id":..., 585567, Test
    organisation</p>
  </blockquote>
  
  <ul>
  <li>My organisationType table contains multiple entries for one organisation as an organisation can be a number of different types. (The following is 2 types assigned to the organisation above)</li>
  </ul>
  
  <blockquote>
    <p>id, dateModified, relativeTable, ref, value</p>
    
    <p>5, 2013-04-22 17:34:55, organisations, 585567, 3</p>
    
    <p>6, 2013-04-22 17:34:55, organisations, 585567, 2</p>
  </blockquote>
  
  <ul>
  <li>Finally my options table contains one row for each type that can be for reference:</li>
  </ul>
  
  <blockquote>
    <p>id,   dateModified,    relativeTable, ref,    value </p>
    
    <p>1,    2013-04-22 16:36:59,     organisations, 2,  Client </p>
    
    <p>2,    2013-04-22 16:36:59,     organisations, 3,  Partner </p>
    
    <p>3,    2013-04-22 16:38:27,     organisations, 4,  Vendor</p>
  </blockquote>
  
  <p>I would like to be able to return one organisation with its type embedded onto the end (o.value)</p>
  
  <p>so my result might be:</p>
  
  <pre><code>[1] =&gt; stdClass Object
          (
              [id] =&gt; 2312
              [object] =&gt; ""
              [ref] =&gt; "585567"
              [title] =&gt; "Test organisation"
              [type] =&gt; array( [0] =&gt; "Client", [1] =&gt; "Vendor" )
          )
  </code></pre>
  
  <p>With my current SQL, I am getting back an array of 2 rows with a duplicate of all components of the row apart from the type which has changed. It's fine, but it's not perfect.</p>