So if your model is basically:
db.define_table('user', SQLField('name'))
db.define_table('tag, SQLField('name'))
db.define_table('user_tags',
SQLField('user_id','reference user'),
SQLField('tag_id','reference tag'))
then
usertags=db(db.user_tags.user_id==theuserid).select('user_tags.tag')
gives you the tags for theuserid you want.
No joins are required.
Joins are explained in:
http://en.wikipedia.org/wiki/Join_(SQL)
has some good "visual explanation" links at the bottom.
Denes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---