diff --git a/Apollo/api/application/models/Hallticket_model.php b/Apollo/api/application/models/Hallticket_model.php index 63235bf0..ab0f3740 100755 --- a/Apollo/api/application/models/Hallticket_model.php +++ b/Apollo/api/application/models/Hallticket_model.php @@ -665,12 +665,12 @@ class Hallticket_model extends CI_Model public function getBatchDetails($UniversityID,$branchId) { - $this->db->select('BatchID,BatchCode,BatchName'); + $this->db->select("BatchID,BatchCode,BatchName,str_to_date( BatchDate,'%d-%m-%Y') as BD"); $this->db->from('T_BatchMaster'); $this->db->where('UniversityID',$UniversityID); $this->db->where('IsActive',1); $this->db->where('BranchCode',$branchId); - $this->db->order_by('BatchID','DESC'); + $this->db->order_by("BD","DESC"); $res = $this->db->get(); return $res->result();