Product redirection for one-dollar cloud purchases

Source: Internet
Author: User
When the quota of a product on the cloud purchase website is full, how does one automatically start a new issue, such as the 001st issue? How does one start the lottery when the product quota is full? Is it a mysql trigger? Or the front-end query database? How can I automatically start a new issue when the quota of a product on the cloud purchase website is full?

For example, if there is a 001st issue and the product enters the lottery after the amount is reached, how does the 002 issue start?
Is it a mysql trigger? Or the front-end query database?

Reply content:

How can I automatically start a new issue when the quota of a product on the cloud purchase website is full?

For example, if there is a 001st issue and the product enters the lottery after the amount is reached, how does the 002 issue start?
Is it a mysql trigger? Or the front-end query database?

When the quota is full, save a flag = 1. If the front-end determines that the flag is 1 again when the request is sent, the page of 002 is displayed.

Recently, I am also writing a similar website in my spare time. My method is to write an update trigger. When the number of buyers reaches the requirement, insert the next phase to the table. However, the problem is that the update or insret of the same table cannot be performed during update. Later, I recorded the number of buyers in the item table to determine the number of buyers when updating the item table. If there is 0 remaining, I updated the current status to sold out and inserted the data for the next phase, finally, initialize the number of buyers of the current product.
The product list is displayed on the home page. Click the product list to view information about the current period.
This is just my personal implementation. I do not know whether it is reasonable or not.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.