HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //var/www/html/qcr24/app/application/models/admin/Mreturn_notice.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Mreturn_notice extends CI_Model {

    public function __construct() {
        parent::__construct();

    }

    public function getreturn_notice(){
        $this->db->select('rn.return_notice_id,rn.rent_out_id,rn.car_no,rn.driver_id,date_format(rn.retrun_notice_date,"%d/%m/%Y") as retrun_notice_date,rn.note,date_format(rn.created_ts,"%d/%m/%Y") as created_ts,rn.created_by,rn.updated_by,date_format(rn.updated_ts,"%d/%m/%Y") as updated_ts,rov.rent_out_no,md.first_name,md.middle_name,md.last_name');
        $this->db->from('return_notice rn');
        $this->db->join('rent_out_vehcile rov','rov.rent_out_id=rn.rent_out_id','inner'); 
        $this->db->join('master_driver md','md.driver_id=rn.driver_id','inner'); 
        // if($search_text){
        //     $this->db->like('rn.car_no', $search_text);
        //     $this->db->or_like('rn.retrun_notice_date', date('Y-m-d', strtotime(str_replace('/', '-', $search_text))));
        // }
		$this->db->group_by('rn.return_notice_id');
        $this->db->order_by('rn.return_notice_id','DESC');
        $query=$this->db->get();
        // print_r($this->db->last_query());die();
		return $query->result_array();
    }

}