'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; } }