文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>在mysql中处理时间戳

在mysql中处理时间戳

时间:2010-09-17  来源:luoine

把mysql中时间戳转化成正常时间, 用mysql函数: from_unixtime(数据库time字段,“%Y%m%d”);

例如,按月统计:


  1. select count(id), from_unixtime(select_time,'%Y-%m'as result, from_unixtime(select_time,'%Y')as year, from_unixtime(select_time,'%m'as month 
  2.                 from diray 
  3.                 group by  yearmonth  
  4.                 order by  year descmonth desc 
排行榜 更多 +
宝宝巴士学加减法

宝宝巴士学加减法

休闲益智 下载
重装上阵国际服最新版本

重装上阵国际服最新版本

飞行射击 下载
多多海洋动物app

多多海洋动物app

休闲益智 下载