I'm trying to add(or update in case it isn't alreadythere) some records to 
a db in a loop and I want to fill the entries with the sum of the default 
db values with some other values, but somehow, when trying to insert,it's 
not working. It's something like this:

 db.cTable.update_or_insert((db.cTable.User == row.id)  & (db.cTable.Year 
== int(datatemp[2])) &
                            (db.cTable.Month == int(datatemp[1])), User = 
row.id, 
                Year = int(datatemp[2]), Month = int(datatemp[1]), 
                cost = db.cTable.cost + data[t][0])


Any ideas?

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to