I have the following script:
import pymysql
cobertura = (10, 20)
base_de_dados = pymysql.connect("localhost", "root", "senha", "base_de_dados")
cursor = base_de_dados.cursor()
cursor.executemany("INSERT INTO individuo VALUES (NULL, %s)", (cobertura))
base_de_dados.commit()
base_de_dados.close()
When I run, instead of values (10, 20) being saved as tuples in my database, they are written to different rows. For example, the value 10 in column 1 row 1 and the value 20 in column 1 row 2.
How do I get values to be saved as tuples in the same cell?
Thanks to those who can help me!