TypeError:'builtin_function_or_method'对象不可下标是什么意思?

时间:2020-05-07 21:36:14

标签: python-3.x sqlite

我正在更新数据库中的值,并且出现问题。这是代码。

def withdraw(self, withdraw_amount, acount_no ,name):
        self.withdraw_amount = withdraw_amount
        self.acount_no = acount_no
        self.name = name
        self.new_amount = 0
        cur.execute('SELECT Amount FROM Users WHERE Name=? AND Acount=?',(self.name,self.acount_no))

        self.new_amount=cur.fetchall[0][0] + self.withdraw_amount
        cur.execute('UPDATE Users SET Amount=? WHERE Name=? AND Acount=?(self.new_amount,self.name,self.acount_no,))
        con.commit()

0 个答案:

没有答案