I am trying to update a value in one table (csms) in MySQL from another table (serviceppl). I have attached the query I wrote and both tables, but the query does not work. It does not produce any error, but the record doesn't get updated. Help!
query = "select*from csms where feedback in('null', 'I expect a better one', 'Bad one! Need one again')"
mycursor.execute(query)
p = mycursor.fetchall()
for i in p:
query_upserv = """update csms inner join serviceppl on csms.product = serviceppl.speciality
set serviceppl.name = csms.serviceman where csms.product = '{}'""".format(i[4])
mycursor.execute(query_upserv)
mycon.commit()
