title: GROUP_CONCAT multiple values from table
body: <p>I just added a table which holds a url and description for each item in place. The below query works ok ... but it's only returning the url and I need the desc also. I m not sure how to make this work.</p>
  
  <pre><code>$query_str = "SELECT      a.userid, a.cat, a.id, a.name, a.image, 
                            a.desc, a.country, b.user_id, c.username, 
                            c.fbook, d.cat_id,
                            (
                                 SELECT GROUP_CONCAT(url) 
                                 FROM one_add o 
                                 WHERE a.id=o.one_id
  
                            ) AS url,
                            (
                                 SELECT COUNT(id) 
                                 FROM one_msg m 
                                 WHERE m.guest_id = ? AND 
                                       m.one_id=a.id 
                            ) AS count
                 FROM place a
                              LEFT OUTER JOIN wait b 
                                   ON a.id=b.post_id AND 
                                      b.user_id= ?
                              JOIN users c
                                   ON a.userid=c.id
                              LEFT JOIN ( 
                                         SELECT userid, user_id, 
                                                GROUP_CONCAT( cat_id ) AS cat_id 
                                         FROM user_cat 
                                         WHERE userid='$user_id' 
                                         GROUP BY user_id 
                                        ) AS d ON d.userid='$user_id' AND 
                                                  d.user_id=a.userid
                WHERE a.cat != ? ORDER BY a.date desc";
  </code></pre>
  
  <p>This is what I want to accomplish:  <code>&lt;a href="url"&gt;desc&lt;/a&gt;</code></p>