title: CodeIgniter GROUP_CONCAT and join
body: <p>I am trying to figure a way to join these two tables together, which I was able to do, but if it found more than one value that matched, it showed everything from the product table again. Now I am trying to use the MySQL group_concat together to be able to list all of tName in one field in the array but I keep getting an error with MySQL:</p>
  <blockquote>
  <p>Error Number: 1064</p>
  <p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM (<code>sp_product</code>) LEFT OUTER JOIN <code>sp_product_type</code> ON <code>sp_product_type</code>.`tCat' at line 2</p>
  <p>SELECT <code>sp_product</code>.<code>name</code>, <code>sp_product</code>.<code>price</code>, <code>sp_product</code>.<code>perm_name</code>, <code>sp_product</code>.<code>description</code>, GROUP_CONCAT(product_type.tName SEPARATOR FROM (<code>sp_product</code>) LEFT OUTER JOIN <code>sp_product_type</code> ON <code>sp_product_type</code>.<code>tCategory</code> = <code>sp_product</code>.<code>type</code> WHERE <code>perm_name</code> = 'bacon'</p>
  </blockquote>
  <pre><code>$this-&gt;db-&gt;select('product.name, product.price, product.perm_name, product.description, GROUP_CONCAT(product_type.tName SEPARATOR ',') as product_type.tName'); 
  $this-&gt;db-&gt;from('product');
  $this-&gt;db-&gt;where('perm_name', $this-&gt;uri-&gt;segment(2));
  $this-&gt;db-&gt;join('product_type', 'product_type.tCategory = product.type', 'LEFT OUTER');
  $query = $this-&gt;db-&gt;get(); 
  </code></pre>
  <p>Any ideas what I am doing wrong?</p>