作者 anyv
1 个管道 的构建 通过 耗费 0 秒

4

... ... @@ -45,9 +45,9 @@ class SchoolController extends WeChatBaseController{
$school_data[$key]['grade'] = Db::name('grade_class') -> where("school_id",$val['id']) -> select() -> toArray();
}
//循环遍历比对
foreach ($school_data as $key => $val){
/* foreach ($school_data as $key => $val){
if()
}
}*/
$school['uid'] = cmf_get_current_user_id();
$school['create_time'] = time();
$school['region'] = $_POST['region'];
... ... @@ -68,11 +68,11 @@ class SchoolController extends WeChatBaseController{
}
}else{
$data = Db::name('school') -> select() -> toArray();
/*$data = Db::name('school') -> select() -> toArray();
foreach ($data as $key => $val){
$data[$key]['grade'] = Db::name('grade_class') -> where("school_id",$val['id']) -> select() -> toArray();
}
dump($data);die;
dump($data);die;*/
return $this -> fetch();
}
... ...