打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
延迟更新
/**
* 字段值延迟增长
* @access public
* @param string $field 字段名
* @param integer $step 增长值
* @param integer $lazyTime 延时时间(s)
* @return boolean
*/
1    public function setLazyInc($field,$step=1,$lazyTime=0) {
2               $condition = $this->options[‘where’];
3              if(empty($condition)) {        // 没有条件不做任何更新
4                           return false;
5               }
6              if($lazyTime>0) {// 延迟写入
7                           dump($this->name);//debug
8                           dump($field,true);//debug
9                           dump($condition,true);//debug
10                         echo $guid = md5($this->name.’_’.$field.’_’.serialize($condition));
11                         $step = $this->lazyWrite($guid,$step,$lazyTime);
12                          if(false === $step ) return true; // 等待下次写入
13            }
14           return $this->setField($field,array(‘exp’,$field.’+’.$step));
15   }
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Eclipse中的debug的使用
shopnc二次开发
yii 数据库增删查改
Ned Batchelder: Asserts
Struts2 的表单验证
struts2中validation校验框架的原理和使用
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服