2013年11月8日
摘要: php内存不足诱因有3:1. memory_limit2. RLimitMEM 200000000 in httpd.conf3. ulimit -a 或 文件/usr/sbin/httpd限制了ulimitfile_put_contents函数会自动加排他锁LOCK_EX$formatted = sprintf("%020.2f", $money); //20表示总长20位(包括小数点),若结果超过20位,则以结果为准天气API:http://www.google.com/ig/api?weather=广州 http://www.google.com/ig/api?wea 阅读全文
posted @ 2013-11-08 09:33 gdutzzh 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 统计函数的参数不能使用别名,如 sum(A+B)select 0 = 0000-00-00; //结果为1(true),也就是说全0的日期等价于0, php中也成立,且empty(0)为trueselect (@count:=@count+1) rowid from (select (@count:=0)) A; //其中A和:=都是必须的,否则会报错select * from (select * from table_name) A, table_name2 //在mysql查询时,只要其中一个表的子查询查询结果为空,则所有结果也为空复制表(只复制结构,源表名:a 新表名:b)SQL: se 阅读全文
posted @ 2013-11-08 09:12 gdutzzh 阅读(111) 评论(0) 推荐(0) 编辑