mysql get array of ids
===

So i have a database with a few tables. the main is Plant. I also have a PlantEffects table that has plant_id, effect_id.  What I need to do select Plants but with the top 5 PlantEffects by count on PlantEffects.effect_id. So it would come out as

|ID|NAME|top_effect_ids|<br />
|1 |abc |1,4,5,6,7     |<br />
|2 |def |3,2,9,7,5     |

