def get_money(self, bill_id):
with self.connection:
result = self.cursor.execute("SELECT money FROM check WHERE bill_id = ?", (bill_id,))
return result.fetchall()[0][0]
Ошибка:
result = self.cursor.execute("SELECT money FROM check WHERE bill_id = ?", (bill_id,))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: near "check": syntax error