文件
mashangyoujiu/Application/Common/Model/WebsetModel.class.php

27 行
696 B
PHP
可执行文件

<?php
/**
* 小程序授权模型数据
*/
namespace Common\Model;
use Think\Model;
class WebsetModel extends Model
{
protected $tableName = 'webset';
protected $fields = array(
0 => 'id', // int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
1 => 'version', // int(11) NOT NULL AUTO_INCREMENT COMMENT '当前系统版本',
);
//获取版本号
public function getVersion(){
$map['id'] = 1;
$cache = $this->where($map)->getField('version');
return $cache;
}
public function updateVersion($version){
$map['id'] = 1;
$cache = $this->where($map)->save(array("version"=>$version));
return $cache;
}
}