I cannot update my Tinyint value (valid_state) with following code:
<code> mycursor = mydb.cursor()
sql = "UPDATE `my-table` SET valid_name=%s, valid_state=%s WHERE customer_name=%s"
val = (valid_name, 1, cust_name)
mycursor.execute(sql, val)
mydb.commit()
</code>
<code> mycursor = mydb.cursor()
sql = "UPDATE `my-table` SET valid_name=%s, valid_state=%s WHERE customer_name=%s"
val = (valid_name, 1, cust_name)
mycursor.execute(sql, val)
mydb.commit()
</code>
mycursor = mydb.cursor()
sql = "UPDATE `my-table` SET valid_name=%s, valid_state=%s WHERE customer_name=%s"
val = (valid_name, 1, cust_name)
mycursor.execute(sql, val)
mydb.commit()
What is the problem with this code?
MySQL: 14.14
Python: 3.11.5