inserting the content of a python list to a mysql database
I am new to working in linux though have abit of exposure in working on a mysql database. Am working on a project and some part of the script is able to read for me a python list which i use in the main program to give me
seq = [10,12,13,14,15,16,17,18]
am trying to use use a for loop to write back the content of the list to a colunm in the database
for x in seq:
sql_stm = 'insert into testinsert (time_after) values (%d)', (x)
cursor.execute(sql_stm)
but keep getting an error. Can someone help me on how i can write the content of the list to the column time-after
|