摘要: MySQL数据库提供了很多函数包括: 数学函数; 字符串函数; 日期和时间函数; 条件判断函数; 系统信息函数; 加密函数; 格式化函数; 一、数学函数 数学函数主要用于处理数字,包括整型、浮点数等。 返回x的绝对值 SELECT ABS(-1) -- 返回1 返回大于或等于x的最小整数 SELEC 阅读全文
posted @ 2017-08-03 22:32 坚持一点点 阅读(91) 评论(0) 推荐(0) 编辑
摘要: strtotime() 函数将任何英文文本的日期或时间描述解析为 Unix 时间戳 <?php echo(strtotime("now") . "<br>"); echo(strtotime("15 October 1980") . "<br>"); echo(strtotime("+5 hours 阅读全文
posted @ 2017-08-03 15:29 坚持一点点 阅读(359) 评论(0) 推荐(0) 编辑
摘要: /** * @param $birthday 出生年月日(1992-1-3) * @return string 年龄 */ function countage($birthday){ $year=date('Y'); $month=date('m'); if(substr($month,0,1)==0){ $month=substr($month,1... 阅读全文
posted @ 2017-08-03 10:38 坚持一点点 阅读(4172) 评论(0) 推荐(0) 编辑