user = web.ctx.db.select('role', where="verify_email_token='" +
path + "'")
for data in user:
with web.ctx.db.transaction():
web.ctx.db.update('role', where="verify_email_token ='"
+ path + "'", verify_email_token = '', email=data.new_email)
web.ctx.session.alerts.append('email_verified')
raise web.seeother("/", absolute = True)
The issue here is that the table is not being updated for some reason. I
think that is must be the SELECT statement which does not allow to update
the table afterwards.
When I just use the UPDATE statement the table does update. I need it so
the email column updates with the data in new_email column.
Any idea?
Googling I found that there is a SELECT FOR UPDATE clause, but there's no
mention of it in web.py cookbook.
Thanks guys!
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.