Emanuele,

swap OUTER JOIN for INNER JOIN and you will not need to GROUP it.

Daniel

On Fri, Jun 10, 2011 at 9:24 AM, Emanuele Ricci <ste...@gmail.com> wrote:
> Ok I solved it:
>
> SELECT posts.post_id, posts.post_title,
> GROUP_CONCAT(categories.category_name) AS categories_name,
> GROUP_CONCAT(categories.category_id) AS categories_id,
> GROUP_CONCAT(tags.tag_id) AS tags_id, GROUP_CONCAT(tags.tag_name) AS
> tags_name FROM posts LEFT OUTER JOIN posts_categories ON
> posts_categories.post_id=posts.post_id LEFT OUTER JOIN categories ON
> posts_categories.category_id=categories.category_id LEFT OUTER JOIN
> posts_tags ON posts_tags.post_id=posts.post_id LEFT OUTER JOIN tags ON
> posts_tags.tag_id=tags.tag_id GROUP BY posts.post_id;
>
> Thank you very much for the hint of GROUP_CONCAT!!!
>
> Anyway I always think that Android need something to bind Object to DB like
> in web frameworks :)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Daniel Drozdzewski

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to