Question : hasAny cakephp
Answered by : vi-ly
// 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;
}
Source : | Last Update : Thu, 25 Feb 21