So here's the SQL I have
SELECT c.name AS 'name',
COUNT(sc.condition_id) AS 'conditions_count'
FROM reviews r, strain_conditions sc
LEFT JOIN conditions c ON sc.condition_id = c.id
WHERE sc.strain_id = 1 && sc.review_id = r.id && r.moderated = 1
GROUP BY sc.condition_id
ORDER BY conditions_count DESC
LIMIT 3;
Which returns
+---------------+------------------+
| name | conditions_count |
+---------------+------------------+
| Fiber Myalgia | 2 |
| Anxiety | 2 |
| ADHD | 1 |
+---------------+------------------+
What I need to do is GROUP_CONCAT the name results so my end result is simply
"Fiber Myalgia, Anxiety, ADHD"