摘要:
在mysql中,查询某字段为null空时,切记不可用 = null,而是 is null,不为空则是 is not null 而不是 != null select * from table where column is null; select * from table where column 阅读全文
摘要:
方法一: 方法二: PHP mktime() 函数用于返回一个日期的 Unix 时间戳。 语法 mktime(hour,minute,second,month,day,year,is_dst) 可选。如果时间在日光节约时间(DST)期间,则设置为1,否则设置为0,若未知,则设置为-1。 自 5.1. 阅读全文
摘要:
PHP百分号转小数: php 小数转换百分数函数: 阅读全文
摘要:
$num = 10.4567; //第一种:利用round()对浮点数进行四舍五入 echo round($num,2); //10.46 //第二种:利用sprintf格式化字符串 $format_num = sprintf("%.2f",$num); echo $format_num; //10.46 ... 阅读全文