Hi svilen,

thanks. I have that query working now.

On Mar 15, 9:10 am, svilen <[EMAIL PROTECTED]> wrote:
> use table.alias() for one of the roles - or for both.
>
> > Hi,
>
> > I doing a msg board with nested sets as descrived on
> >http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
>
> > I'm not sure how to do a statement like this in sqlalchemy:
>
> > SELECT node.id, node.topic, node.content
> > FROM nested_category AS node, nested_category AS parent
> > WHERE node.lft BETWEEN parent.lft AND parent.rgt
> >              AND parent.id = 1
> > ORDER BY node.lft;
>
> > how do i specify parent and node distinctions? I have a
> > assign_mapped Message()
>
> > so, i'm doing
> > Message.select(_and(Message.c.lft.between(Message.c.lft,
> > Message.c.rgt), Message.c.id==1), order_by=Message.c.lft)
>
> > which might not work right?
>
> > can someone suggest a how do to this please?
>
> > thanks,
> > -tml


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to