Hi there, I need to update my table record only if the user is logged in with a different session from the previous, but with the code i have, it keeps updating when i thought the user still logged in with the same session. problem is i can't view the session id which seem to be encrypted, i can't tell when its the same and when its not. Did i miss something? below is my code:
prev_ses_id = db((db.rates.user_id==auth.user.id) & (db.rates.item_id==request.args(0))).select(db.rates.ses_id) myrow = db((db.rates.user_id==auth.user.id) & (db.rates.item_id==request.args(0)) & ~(db.rates.ses_id==prev_ses_id)).update(search_term=db.rates.search_term + ' ' + str(request.vars.search_term),interest=db.rates.interest + ' ' + (dictionary.synonym(request.vars.search_term)), clicks=db.rates.clicks+1) Will appreciate all the help i can get. Thanks -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.