Welcome Guest, Not a member yet? Register   Sign In
GROUP CONCAT / GROUP BY ?
#2

[eluser]vitoco[/eluser]
The idea here it's to show each news once....so you have to group the query for the field that must be unique in the resulset, i guess news.news_id , and GROUP_CONCAT the fields that will have more than one occurrence for news.news_id, in this case i guess the news_categories.news_category_id. So the result will be a row ( news ) with a field with all his categories concatenated.

Slds.


Messages In This Thread
GROUP CONCAT / GROUP BY ? - by El Forum - 12-12-2012, 05:47 AM
GROUP CONCAT / GROUP BY ? - by El Forum - 12-14-2012, 09:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB