title: mySQL: Subquery to array?
body: <p>I am working on a slight complex (at least for me) mySQL query containing a subquery and it isn't going to well to be honest.</p>
  
  <pre><code>SELECT `products`.`id`, `product`.`price`, 
    ( SELECT `value` FROM (`productValues`) 
      WHERE `productValues`.`product` = 'product.id'
    ) as values 
  FROM (`products`) WHERE`product`.`active` = 1
  </code></pre>
  
  <p>The current result looks like this:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [id] =&gt; 1
              [active] =&gt; 1
              [price] =&gt; 1000
              [values] =&gt; 
          )
  )
  </code></pre>
  
  <p>What I want is the values element to also  become an array with all elements in the Values table which matches (<code>WHERE productValues.product = product.id</code>).</p>
  
  <p>What am I doing wrong?</p>