On Fri, Jun 10, 2011 at 5:24 PM, Emanuele Ricci <[email protected]> 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 :)
>

Of course, such a thing exists :) But if you don't understand how SQL
works, you still might not get good results.

http://ormlite.com/sqlite_java_android_orm.shtml

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

Reply via email to