Home > Backend Development > PHP Tutorial > 团购商品,团购人数的较好实现思路?

团购商品,团购人数的较好实现思路?

WBOY
Release: 2016-06-23 13:53:52
Original
2067 people have browsed it

团购商品,团购人数一般都是假数据吧,怎么处理比较好了?


回复讨论(解决方案)

??crontab 每分?自???增加M~N?。

这样会不会显得太假了,应该有其他的解决方案

??crontab 每分?自???增加M~N?。

假在哪??
我意思是,你?置了M分?增加N?,并不是直接+N
而是在M分??,?N/M 分? 增加1。

当1个用户订购的时候;
数量 = 数量 + rand(2,5);

定时往订单表,插入数据。

添加数据时候生成参团人数随机1-499,实际参团在基数上+1

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template