摘要: 枚举:enum,实现将所有可能出现的结果都设计好,实际上存储的数据必须是规定好的数据中的一个。 枚举的使用方式 定义:enum(可能出现的元素列表); //如enum(‘男’,‘女’) 使用:存储数据,只能存储上面定义好的数据 意义在于: 1, 限定值的可能性! 2, 速度快,比普通的字符串速度快! 阅读全文
posted @ 2019-08-11 08:04 期待明天** 阅读(21994) 评论(0) 推荐(0) 编辑
摘要: 数据表的内容: selectnumber,sum( if( score >= 60, score, 0)) as total_score,sum( if( score < 60, 1, 0 )) as sum_notpassfrom students.score group by number 统计 阅读全文
posted @ 2019-08-09 16:45 期待明天** 阅读(12281) 评论(0) 推荐(0) 编辑
摘要: //内存使用情况1. memory_get_usage() //需要开启扩展2. xdebug_debug_zval(); 1 //zval变量容器 2 $a = range(0,5); 3 xdebug_debug_zval('a'); 4 5 //定义b,把a的值赋给b 6 $b = $a; 7 阅读全文
posted @ 2019-08-08 12:29 期待明天** 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1:__autoload($class) 因为是一个函数,所以只能定义一次,使用多个会冲突报错;而 sql_autoload_register('function') 可定义多个,它有效地创建一个队列的自动装载函数并按顺序依次定义 2:SPL函数很丰富,有更多的操作空间:如spl_autoload_ 阅读全文
posted @ 2019-08-01 22:25 期待明天** 阅读(200) 评论(0) 推荐(0) 编辑