The commodity jump problem of one dollar cloud purchase

Source: Internet
Author: User
Ask the Cloud Purchase website when a product quota is full, how to automatically start a new issue

For example, now is the No. 001 issue, the goods full of the amount of money to enter the lottery link, then how to start the 002 period?
Is it a MySQL trigger? Or a front-end query database?

Reply content:

Ask the Cloud Purchase website when a product quota is full, how to automatically start a new issue

For example, now is the No. 001 issue, the goods full of the amount of money to enter the lottery link, then how to start the 002 period?
Is it a MySQL trigger? Or a front-end query database?

After the quota is full, save a flag bit flag=1, the front end again request when Judge flag=1 words, display 002 issue of the page is good.

I have been writing a similar website in my spare time recently, and my method is to write an update trigger to insert the next issue into the table when the number of buyers reaches the required time. However, one problem is that you cannot update or insret the same table when you update. Later, I recorded the purchase number in the Product List Update commodity table when the purchase number, if the remaining 0 update the current period status is sold out, and then insert the next period of data, and finally initialize the current product purchase number.
The home list shows the list of items, and click on the product list to view information for the current period.
This is only my personal realization, do not know whether it is reasonable, but also hope that sensible advice.

  • 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.