The last statement is between two db(condition1 & condition2) as in
db(condition1 & condition2) & db(condition3 & condition4)

Why not make this statement and try it
db(condition1 & condition2 & condition3 & condition4).select()

Ron

On Oct 9, 11:09 am, Jason Brower <[email protected]> wrote:
>      #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