如果你的VPS或服务器时间突然不准对uc/uch/dz中的数据进行恢复

一个朋友的VPS突然变成2017年了,这样直接导致好多的日期字段都是2017年的,即使你将服务器时间调回正确,数据确实是已经被记录了,犹其是一些按日期排行的数据会一直持续的挂在首页直到2017年。哈哈。。这实在有点烦人。。

下面说一下我的解决方法,其实很简单就是将日期差减回去就行了。

这个数字是当前的时间,你可以通过time函数得到 1272263385
select * from `uchome_notification`  where dateline >1272263385

然后找到表中日期最大的那个日期,相减得到日期差 247665335

下面是对相关表数据进行更新

update `uchome_notification` set dateline = dateline -247665335
where dateline >1272263385

 


update uchome_friend
set dateline = dateline -247665335
where dateline >1272263385


update uchome_vistor
set dateline = dateline -247665335
where dateline >1272263385

update uchome_space
set updatetime = updatetime - 247665335
where updatetime >1272263385

 附康盛UCHome相关的数据字典:点击下载此文件,改名为htm即可查看。
 



[本日志由 airzen 于 2010-01-07 07:30 PM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
评论: 0 | 引用: 0 | 查看次数: 11193
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭