I have this list I am trying to insert into my database. I have tried many other methods I found on Google or here but none seems to work.
results = ['match number 1','match number 2','match number 3']
query = "INSERT INTO round1 (details) VALUES ("
query = query+"'"+results+"')"
x = conn.cursor()
x.execute(query)
conn.commit()
I keep getting this error
Type Error: cannot concatenate 'str' and 'list' objects
Can anyone tell me what I am doing wrong?
resultsas one column, as multiple columns or as multiple rows? Your query suggests you are inserting just one column, and I am guessing you want multiple rows.