I am getting type error in Flask, saying:
TypeError: write() argument must be str, not tuple when trying to fetch data from the mysql db using python
Here is the part of the code
if request.form.get('Body') == "SRE1":
advert = mysql.connection.cursor()
advert.execute("SELECT message FROM data1 WHERE code='SRE1' ")
myresult = advert.fetchall()
for row in myresult:
resp.message(row)
return str(resp)