so I am making an sql database for businesses to use and when I enter the date it doesn't work and it throws up this error:
Traceback (most recent call last):
File "/Users/samwest/Desktop/python stuff/inflows database.py", line 18, in <module>
c.execute("INSERT INTO outflows VALUES ('{}',{},{},{})".format(item, quantity, cost, date))
sqlite3.OperationalError: table outflows has 3 columns but 4 values were supplied
in the past also when I have got the input working instead of displaying the date it just then takes away each number in the date from each other. There is also the issue that the name of the item doesn't show when the {item} is used. here is the code that I am trying to get working now:
item = input("please enter the name of an item: ")
quantity = int(input("enter quantity of {item}s: "))
cost = int(input("enter the cost of one {item}: "))
date = (input("enter the date at which the {} was purchased(formtat YYYY-MM-DD): "))
c.execute("INSERT INTO proto3 VALUES ('{}',{},{},{})".format(item, quantity, cost, date))
any help would be great thanks