diff --git a/Apollo/api/application/config/database.php b/Apollo/api/application/config/database.php index 85c869df..8bed7f7c 100755 --- a/Apollo/api/application/config/database.php +++ b/Apollo/api/application/config/database.php @@ -84,9 +84,9 @@ $db['default'] = array( // 'password' => 'apollosit1234', // 'database' => 'apollod4_ApolloDECNEWSIT', - // 'username' => 'apollod4_PROD', - // 'password' => 'approd!2017', - // 'database' =>'apollod4_ApolloDECNEWPROD', + // 'username' => 'apollod4_PROD', + // 'password' => 'approd!2017', + // 'database' =>'apollod4_ApolloDECNEWPROD', 'dbdriver' => 'mysqli', 'dbprefix' => '', diff --git a/Apollo/api/application/models/Reregister_model.php b/Apollo/api/application/models/Reregister_model.php index 3c08a364..615481a7 100644 --- a/Apollo/api/application/models/Reregister_model.php +++ b/Apollo/api/application/models/Reregister_model.php @@ -95,7 +95,7 @@ class Reregister_model extends CI_Model //print_r($data['studentListOne']); $data['finalStudentList'] = array(); - + // print_r($data['studentListOne']);die(); //print_r($this->db->last_query());die(); foreach($data['studentListOne'] as $student) { @@ -135,7 +135,7 @@ class Reregister_model extends CI_Model $num++; $next_sem = 'YEAR'.$num; } - + //print_r($this->db->last_query());die(); //FIND OUT FEESTYPE ID @@ -162,7 +162,7 @@ class Reregister_model extends CI_Model $this->db->where('T_Students_Fees_Status.FeesType',$feesID); $res = $this->db->get(); $res = $res->result_array(); - // print_r($this->db->last_query()); + // print_r($this->db->last_query());die(); // print_r($res); if($res[0]['feescount'] == 0) { @@ -188,10 +188,22 @@ class Reregister_model extends CI_Model $tempResult = $this->db->query($sqlquery,array($branchId,$tempArray['SessionDate'])); $tempResult = $tempResult->result(); //echo $this->db->last_query(); - if($tempResult[0]){ - $tempArray['nextSessionName'] = $tempResult[0]->SessionName; - $tempArray['nextSessionID'] = $tempResult[0]->SessionID; - } + // print_r($tempResult[0]);die(); + // if($tempResult[0]){ + // $tempArray['nextSessionName'] = $tempResult[0]->SessionName; + // $tempArray['nextSessionID'] = $tempResult[0]->SessionID; + // } + + + if(!empty($tempResult)) + { + foreach($tempResult as $tem) + { + $tempArray['nextSessionName'] = $tem->SessionName; + $tempArray['nextSessionID'] = $tem->SessionID; + } + } + else{ $tempArray['nextSessionName'] = ""; $tempArray['nextSessionID'] = "";