May-24-2020, 08:40 AM
I do not know how sqlite works. And you don't give information on your datastructures. But I guess cartproducts and cartprices are lists. So I think you will have to zip those together.
for item1, item2 in zip(cartproducts, cartprices): c.executemany("INSERT INTO orders(Product_Name, Product_Price) VALUES(?, ?);", (item1, item2, )) connection.commit()(untested)