The following table is my MySQL data of field
The table named infor
+-------------+-------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+-------------------+----------------+
| id | bigint(7) | NO | PRI | NULL | auto_increment |
| temperature | varchar(20) | YES | | NULL | |
| wet | varchar(20) | YES | | NULL | |
| created | timestamp | NO | | CURRENT_TIMESTAMP | |
+-------------+-------------+------+-----+-------------------+----------------+
When I want to upload data to my MySQL server
I use the following code:
temperature_item = '8.7`c'
wet_item = '0.87%'
cur.execute("INSERT INTO infor (temperature,wet) VALUES (temperature_item,wet_item)")
Then it shows the error following:
pymysql.err.InternalError: (1054, "Unknown column 'wet_item' in 'field list'")
But when I type:
cur.execute("INSERT INTO infor (temperature,wet) VALUES ('87`c','8.7%')")
It could work, and I have searched the previous question
Did I add the unprintable word? Or another problem?