I would need your help with updating data in my mysqldb through python. Everything works fine including reading, inserting, etc. The following query does not work...
cursor.execute("UPDATE einzel.check SET Kursbuch = %s WHERE analysen.Nummer = %s" (Decimal(kurs),i[8]))
I tried with several optiosn for kurs and i[8], always I get below message:
cursor.execute("UPDATE einzelanalyse.analysen SET Kurs bei empf = %s WHERE analysen.Nummer = %s" (Decimal(kurs),i[12]))
TypeError: 'str' object is not callable
str(i[8]) does not work either.
"kurs" is a decimal. In the program I used it with Decimal(kurs) I could calculate without problems. The value to be written in the database "Kurs bei empf" has the format decimal(10,2)
i[12] is a part of an entry of a database which I fetched before. in the database the format is int(11)
Thanks in advance for your help!
Grüße!
Decimaland by placing some test value like1.01?einzelanalyse.analysenSETKurs bei empf= %s WHEREanalysen.Nummer= %s" (1.01, 178317)) it does not work either. but now I see the problem, I think it is the spaces in 'Kurs bei empf'. could that be the case?