Hi Niphlod,

Thanks for your reply.

I have been trying to get the self-refrence and alias to work, but I got 
stuck. What i've got sofar is:

vertexfrom = db.edg_edge.with_alias('vertexfrom')
rows = db((db.edg_edge.toID==8) & (db.edg_edge.fromID==db.vtx_vertex.id))\
    .select(db.edg_edge.fromID, db.edg_edge.toID, db.edg_edge.label, 
vertexfrom.fromID,
    left=(db.edg_edge.on((db.edg_edge.toID==vertexfrom.fromID) & 
(vertexfrom.fromID==8))))


What I expect is this:

USC Fit    ClubW    sub    ClubW
Make M    ClubW    supporter ClubW
Life Fit      ClubW    provider    ClubW
Techno     ClubW    supporter  ClubW


What I get is:

USC Fit    ClubW    sub    ClubW
USC Fit    ClubW    sub    ClubW
USC Fit    ClubW    sub    ClubW
USC Fit    ClubW    sub    ClubW
USC Fit    ClubW    sub    ClubW
Make M    ClubW    supporter ClubW
Make M    ClubW    supporter ClubW
Make M    ClubW    supporter ClubW
Make M    ClubW    supporter ClubW
Make M    ClubW    supporter ClubW
Life Fit      ClubW    provider    ClubW
Life Fit      ClubW    provider    ClubW
Life Fit      ClubW    provider    ClubW
Life Fit      ClubW    provider    ClubW
Life Fit      ClubW    provider    ClubW
Techno     ClubW    supporter  ClubW
Techno     ClubW    supporter  ClubW
Techno     ClubW    supporter  ClubW
Techno     ClubW    supporter  ClubW
Techno     ClubW    supporter  ClubW


I hope you could tell me what's wrong with my query.

Kind regards,

Annet

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to