This article mainly introduces the method of thinkPHP to implement the order digital reminder function, involving the implementation skills of thinkPHP database query, traversal and front-end display related functions. Friends in need can refer to the
The operation effect diagram is as follows:
html:
php:
// 各种状态的数字提醒 $whereall = array('member_id' => $this->member_id); $allorder = $this->orderModel->where($whereall)->select(); $num = array('all'=>0,'unpaid'=>0,'unsent'=>0,'unresevied'=>0,'resevied'=>0); foreach ($allorder as $k => $order) { if ( $order['paytime'] == 0 ) { $num['unpaid']++ ; } if ($order['paytime'] != 0 && $order['sendtime'] == 0) { $num['unsent'] ++ ; } if ($order['paytime'] != 0 && $order['sendtime'] != 0 && $order['receivetime'] == 0) { $num['unresevied'] ++ ; } if ($order['paytime'] != 0 && $order['sendtime'] != 0 && $order['receivetime'] != 0) { $num['resevied'] ++ ; } $num['all'] ++ ; } $this->assign('num',$num);
This time the value is passed in the form of an array, which is consistent.
Add a fixed layout effect
css:
The above is the entire article Content, I hope it will be helpful to everyone’s study.
Related recommendations:
phpEncryption methods during development
phpDetailed explanation of session application
PHP method to implement the function of randomly generating watermark images
The above is the detailed content of ThinkPHP's method of implementing order digital reminder function. For more information, please follow other related articles on the PHP Chinese website!