First of all: thanks! This is the first web framework I've come
across that I can wrap my head 'round :-) -- well, almost... This
code:
userqvs = dict(u=uid)
. . .
update = db.update('users', userqvs, where='id = $u', tasks=tc)
causes this error:
TypeError: update() got multiple values for keyword argument 'where'
I was trying to point db.update at a particular record to be updated,
where I know the id (primary key) of it. However, if I change it to
hardcode a uid:
update = db.update('users', where='id = 1', tasks=tc)
it seems to work -- but this is not useful to me because I will not
know the id of the record requiring an update until run-time.
I was able to make it work by doing a db.query instead:
update = db.query('UPDATE users SET tasks = ' + str(tc) + ' WHERE id =
' + str(uid))
It seems that db.update is a cleaner method, though, so I'd like to
use it; I'd be grateful if anyone could tell me what I'm doing wrong;
thanks for your time.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---