#Get the users tags
users_tags = db((db.auth_user.id==db.user_tags.user_id) & (db.user_tags.tag_id==db.tag.id))
    #Get the advertisement's tags too
advertisements_tags = db((db.advertisement.id == db.advertisement_tags.advertisement_id) & (db.tag.id == db.advertisement_tags.tag_id))
    #Now glue dem tegever and select them
    users_advertisements = (advertisements_tags & users_tags).select()

I am trying to get the tags that the current use and the advertisements have in common. This is to do targeted advertising. auth_user is my auth database.
How can I make it happen?  Why doesn't the last one work?
---
Best Regards,
Jason Brower

Reply via email to