For product inventory problems, each time a customer buys an inventory, one is reduced accordingly.
Source: Internet
Author: User
If there is a commodity inventory problem, each time a customer buys an inventory, one is reduced accordingly. PHP statement, as an online store. The inventory of a commodity is 10, and each time a customer buys an inventory, it is reduced by one. In the past, I used to add, delete, modify, and query data. I suddenly encountered this problem and did not know how to start it. Which of the following powerful gods has trouble posting code? if there is no code to talk about the idea, there is also a commodity inventory problem. each time a customer buys an inventory, it will be reduced by one.
PHP statement, as an online store. The inventory of a commodity is 10, and each time a customer buys an inventory, it is reduced by one. In the past, I used to add, delete, modify, and query data. I suddenly encountered this problem and did not know how to start it. Which of the following powerful gods has trouble posting code? if there is no code, let's talk about the idea and share it with the php inventory:
------ Solution --------------------
Update item set Inventory = inventory-1 is not enough
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.