Hello sorry for my English because I am french. I have a problem
when I run the program and I enter the right code that is "10"
it doesn't change the state of presence, but on the contrary, it shows me directly: "the code is not in the database"
I don't understand too much because it has to change my state from 0 to 1 in my database but my program runs as if I didn't enter the right code.
If you could help me with that I would be eternally grateful.
look my programm:
when I run the program and I enter the right code that is "10"
it doesn't change the state of presence, but on the contrary, it shows me directly: "the code is not in the database"
I don't understand too much because it has to change my state from 0 to 1 in my database but my program runs as if I didn't enter the right code.
If you could help me with that I would be eternally grateful.
look my programm:
if (x) in (resultat):
operation= ("SELECT * FROM enfants3; UPDATE enfants3 SET presence=""1"" WHERE RFID= 10")
for result in cursor.execute(operation, multi=True):
result.with_rows
print("Rows produced by statement '{}':".format(
result.statement))
print(result.fetchall())
print("Number of rows affected by statement '{}': {}".format(
result.statement, result.rowcount))
else:
print("the code is not in my database")
