📅  最后修改于: 2022-03-11 14:54:38.652000             🧑  作者: Mango
// check same schoolcode.
$conditions = array(
'School.school_code' => $data['School']['school_code'],
);
if ($this->School->hasAny($conditions)) {
$this->Session->setFlash(__('school_code_is_exist'), 'flash/error');
goto load_data;
}