MYSQL查询一周内的数据(最近7天的)的方法
这个方法是在网上找到的,因为在lofter山寨计划中写到一个功能块的时候需要用到这种查询方法,所以skidu将它记录下来
查询一天:
select * from table where to_days(column_time) = to_days(now());
select * from table where date(column_time) = curdate();
这个方法是在网上找到的,因为在lofter山寨计划中写到一个功能块的时候需要用到这种查询方法,所以skidu将它记录下来
查询一天:
select * from table where to_days(column_time) = to_days(now());
select * from table where date(column_time) = curdate();
1、下载,例如下载DiscuzX2
wget http://download.comsenz.com/DiscuzX/2.0/Discuz_X2_SC_GBK.zip
2、zip解压缩(依旧以上面下载的文件为例)
unzip Discuz_X2_SC_GBK.zip
7zip是一款开源的解压缩软件,不仅自己独有的7z格式,而且支持zip,rar,tar,gzip等众多其他格式,同时7z格式的压缩比例很高,目前很多硬盘版的游戏都采用zip进行打包。下面介绍一下如何在CentOS/Debian/Ubuntu Linux上安装7zip。
<h2>CentOS安装7zip:</h2>
目前yum源上好像还没有7zip,我们可以到http://dag.wieers.com/rpm/packages/p7zip/下载rpm包安装。
<h3>32位CentOS执行下面命令:</h3>
<div>wget -c http://packages.sw.be/p7zip/p7zip-9.13-1.el5.rf.i386.rpm
wget -c http://packages.sw.be/p7zip/p7zip-plugins-9.13-1.el5.rf.i386.rpm
rpm -ivh p7zip-9.13-1.el5.rf.i386.rpm
rpm -ivh p7zip-plugins-9.13-1.el5.rf.i386.rpm</div>