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?