Student model updation : kdk

This commit is contained in:
resicovenba 2018-03-10 15:48:20 +05:30
parent 43dcc13a9c
commit feb9672c63
2 changed files with 5 additions and 5 deletions

View File

@ -496,11 +496,12 @@ class Student_Controller extends REST_Controller {
$req['Comments'] = $data['Comments'];
$req['DeactiveComments'] = $data['IsActive'] == 1 ? '': $data['DeactiveComments'];
$req['IsActive'] = $data['IsActive'];
$req['IsActive'] = $data['IsActive'] == 1 ? "1" : "0";
$req['UpdatedBy'] = $updatedBy;
$date = date('Y-m-d H:i:s');
$req['UpdatedOn'] = $date;
$studentUpdate = $this->student_model->update_student( $req, $updateStudent, $imagename, $imageSource, $size );// Check if the employee exist
if ($studentUpdate)
{

View File

@ -72,7 +72,7 @@ class Student_model extends CI_Model
// list for super admin based on branch
if ($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') {
$this->db->select('*');
$this->db->select('t1.*');
$this->db->from('' . STUDENTS . ' as t1');
// $this->db->order_by('CreatedOn', 'DESC');
@ -224,7 +224,7 @@ class Student_model extends CI_Model
// print_r($getSearchData);exit();
$this->db->select('*');
$this->db->select('t1.*');
$this->db->from('' . STUDENTS . ' as t1');
// $this->db->where('BranchCode', $loginUserBranchId);
@ -1054,12 +1054,11 @@ class Student_model extends CI_Model
public function update_student($empArr, $updateFor, $imagename, $imageSource, $size)
{
// print_r($empArr);exit();
if ($imageSource == '') {
// print_r($empArr);
// print_r($updateFor);
// exit();
$this->db->select('*');
$this->db->from(STUDENTS);
$this->db->where('MobileNumber', $empArr['MobileNumber']);