摘要: //根据二维数组相同值来分组 public static function array_group_by($arr, $key) { $grouped = []; foreach ($arr as $value) { $grouped[$value[$key]][] = $value; } i... 阅读全文
posted @ 2017-03-15 20:16 代罪羊 阅读(899) 评论(0) 推荐(0) 编辑
摘要: /** * 当本页面所有脚本执行完成之后执行(回调函数) * @param string functionName 函数名 * @access protected * @return */ protected function _register_shutdown() { $m = M(); regis... 阅读全文
posted @ 2017-03-08 13:29 代罪羊 阅读(179) 评论(0) 推荐(0) 编辑
摘要: /* 上传缩略图 */ $.ajaxFileUpload({ url:'/admin/Upload/SchoolSendXhb', secureuri:false, fileElementId:'img_url', dataType: 'json', dat... 阅读全文
posted @ 2017-03-08 13:24 代罪羊 阅读(286) 评论(0) 推荐(0) 编辑
摘要: ALTER TABLE `class_student` ADD INDEX `student_id-class_id` (`student_id`, `class_id`);增加索引 alter TABLE `school_info` ADD `school_img` varchar(255) not null COMMENT '学校校徽' after `school_name`; 增加字段 ... 阅读全文
posted @ 2017-03-08 13:23 代罪羊 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-03-08 13:17 代罪羊 阅读(171) 评论(0) 推荐(0) 编辑
摘要: /** * [errArrayCount 合并一个二维数组相同项,数量则相加] * @param [type] $all_date [array] * @return [type] [array] */ public function errArrayCount($all_date){ $item=array(... 阅读全文
posted @ 2017-03-08 13:14 代罪羊 阅读(738) 评论(0) 推荐(0) 编辑
摘要: /** * [empty 清除空值] * @param [type] $data [数组] * @return [type] [array] */ public function emptyValue($data){ // $list = array(); foreach ($data as $k =>... 阅读全文
posted @ 2017-03-08 13:12 代罪羊 阅读(188) 评论(0) 推荐(0) 编辑
摘要: public function arrayProcessing($list, $k){ $data = array(); foreach ($list as $_date) { $data[ $_date[$k] ] = $_date; } return $data; } 阅读全文
posted @ 2017-03-08 13:11 代罪羊 阅读(736) 评论(0) 推荐(0) 编辑
摘要: /** * [ArraySort 二维数组排序] * @param [type] $data [二维数组] * @param [type] $key [根据key排序] */ public function ArraySort($data, $key){ $sort = array( 'direction'... 阅读全文
posted @ 2017-03-08 13:11 代罪羊 阅读(114) 评论(0) 推荐(0) 编辑
摘要: createSection(); // Define table style arrays $styleTable = array('borderSize'=>6, 'borderColor'=>'006699', 'cellMargin'=>80); $styleFirstRow = array('borderBottomSize'=>18, 'borderBottomColor'=>'00... 阅读全文
posted @ 2017-03-08 13:07 代罪羊 阅读(261) 评论(0) 推荐(0) 编辑