How can I implement a rebate function for the mall?
Source: Internet
Author: User
If the mall wants to implement a rebate function, how can we achieve this? for example, if a user buys 100 yuan worth of money, he must return 100 points, 1 point every day, and 100 days. In this case, how should we design the database? how can we write php? can we talk about the idea? is there a function for php to regularly execute code on a daily basis ?, Quote: A field is called "points". if I buy 1, how can I implement a rebate function for the mall?
For example, if a user buys something of 100 yuan, he must return 100 points. One point is returned every day and the score is returned in 100 days.
In this case, how should we design the database? how can we write php? is it a good idea?
------ Solution --------------------
Discussion
Does php support regular code execution every day?
------ Solution --------------------
Discussion
Reference:
A field is called "points". if you buy 100 points, you can add 100 points to it. The "points" are displayed in the background every day "! If it is 0, subtract 1 from them.
Those "points" are offered in the background every day "! = 0
Does php support regular code execution every day?
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