To keep track of how many fruits my visitors buy, I use a mySQL database
(2 columns: "fruit" and "quantity").... so can we make these following
mySQL queries work somehow?
(visitor buys 5 apples):
replace into fruit_database set fruit = 'apple' , quantity = quantity +
5;
(visitor buys 7 apples):
replace into fruit_database set fruit = 'apple' , quantity = quantity +
7;
(visitor buys 1 grape):
replace into fruit_database set fruit = 'grape' , quantity = quantity +
1
Thanks!
(2 columns: "fruit" and "quantity").... so can we make these following
mySQL queries work somehow?
(visitor buys 5 apples):
replace into fruit_database set fruit = 'apple' , quantity = quantity +
5;
(visitor buys 7 apples):
replace into fruit_database set fruit = 'apple' , quantity = quantity +
7;
(visitor buys 1 grape):
replace into fruit_database set fruit = 'grape' , quantity = quantity +
1
Thanks!
Comment