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/taxicamera/pmw_live_testing/old/applicationold/models/admin/Mchangeprofile.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Mchangeprofile extends CI_Model {

    /*
    author: soma
    purpose: Get profile by id
    date: 27-9-2019
    */
    
    public function get_profile($user_id){
        $result=array();
        $query = "select mu.*,up.*,date_format(up.dr_licence_expiry,'%d/%m/%Y') dr_licence_expiry,date_format(up.dr_dc_expiry,'%d/%m/%Y') dr_dc_expiry from master_user mu
        inner join user_profile up  on mu.user_id=up.user_id 
        where mu.user_id='".$user_id."'";
        $query1 = $this->db->query($query);
        $result=$query1->row_array();
        //echo $this->db->last_query();die;
        return $result;
    }  
   
    /*
    author: soma
    purpose: Update profile
    date: 27-9-2019
    */

    public function update_profile($data,$user_id)
    {
        $this->db->where('user_id', $user_id);
        $this->db->update('user_profile', $data);
        return true;
    }

   




}