Hey guys i need some help, i dont know what to do.
I have a db and 2 colums, first column is name and second column is stock/quantity.
I will input the name and then it will check if there is same name of that item in the database, if none then it will automatically add 1 on quantity, if there is 2+ same items in the db, it will total the item and automatically put how many on the quantity.
Example
Name Quantity
Apple 1
Mango 1
then if i add another apple it will become like this.
Name Quantity
Apple 2
Apple 2
Mango 1
If i remove 1 apple the quantity will return back to 1. Im just lost with this one and dont know how im gonna do it. Thanks in advance.
I have a db and 2 colums, first column is name and second column is stock/quantity.
I will input the name and then it will check if there is same name of that item in the database, if none then it will automatically add 1 on quantity, if there is 2+ same items in the db, it will total the item and automatically put how many on the quantity.
Example
Name Quantity
Apple 1
Mango 1
then if i add another apple it will become like this.
Name Quantity
Apple 2
Apple 2
Mango 1
If i remove 1 apple the quantity will return back to 1. Im just lost with this one and dont know how im gonna do it. Thanks in advance.