I'm trying to set up a relation from one table to another that will give ma a count of the unique user_id's that have posted a comment to a post.
For example: I have "post" as the parent table, and "comments" as the child table (with post_id, user_id, comment_body, etc). What I want to be able to do is once I do the DBSession query in my controller, be able to access "post.distinct_users" which would essentially be a "COUNT(DISTINCT(user_id))" on the comments table. How is this done? The #SA and #TG irc channels are quiet right now, so I thought I'd turn to the ML for help. Thanks, Seth --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

