I have a list of list values that I would like to add into mysql database.
tech = [1.0, 1.0, '', 0.92, 0.65, 1.0, 0.83, '', 0.5] hr = [1.0, 2.0, 1.5, 4.0, .83, 1.2]
mysql database has the same column names as the list variables. Can you guide me on how I can implement that?
I tried as below but getting an error "Not all parameters were used in the sql statement:
query = "INSERT INTO statvalues (tech, hr) VALUES (%s, %s)"
values = (tech, hr)
cursor.executemany(query,values)
cursor.close()
database.commit()