[英]How to clear database field after user inactivity, logout or session end
I have a pivot table that is holding shopping cart
type information like so我有一个像这样保存
shopping cart
类型信息的数据透视表
I set processing= true
while I am getting payment information and count them along with the registered
ones so inventory does not get oversold by simultaneous purchases.我在获取付款信息时设置
processing= true
并将它们与registered
信息一起计算,这样库存就不会因同时购买而超卖。 I can set processing=false
if payment fails.如果付款失败,我可以设置
processing=false
。
However in the cases where I don't get to finish payment processing...How do I reset processing
to false when the user logs out, times out or ends their session or any other cases?但是,在我无法完成付款处理的情况下……当用户注销、超时或结束会话或任何其他情况时,我如何将
processing
重置为 false?
Depending on the user activity you could do all of the following:根据用户活动,您可以执行以下所有操作:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.