1234567891011121314151617 |
- <?php
- namespace app\Admin\controller;
- use think\Db;
- class Expire
- {
- public function update(){
- $acocunt =Db::name('Account')->where("is_del=0 and status>=1 and expiretime<='".date("Y-m-d H:i:s")."'")->select();
- foreach ($acocunt as $value){
- Db::name("Account")->where($value)->update(['status'=>2,"updatetime"=>date("Y-m-d H:i:s")]);
- }
- }
- }
|