May-24-2020, 07:00 AM
for item1, item2 in cartproducts, cartprices: c.executemany("INSERT INTO orders(Product_Name, Product_Price) VALUES(?, ?);", (item1, item2, )) connection.commit()I'm currently having issues inserting values from two different lists to my database. I've got the code working for just adding values from one list, but I'm stumped on how to use a second. I need to add the Product Name and Prices together or they just end up separated. Right now I'm getting the error ValueError: too many values to unpack (expected 2) and I'm not sure what the fix is.