<?php

   class Countries_model extends CI_Model {

   public function __construct()

{



    parent::__construct();



}

    public function get_countries()

   {



    log_message('debug', ' poc_dropdown ######################################################inside model ');

    $query ="SELECT * FROM MCountry";



    $query_result = $this->db->query($query);

    log_message('debug', ' poc_dropdown ######################################################calling db query ');

    $data = array();

    foreach($query_result->result() as $row){

        $data[] = $row;

    }

    return $data;

}

}



     function UpdateData($dt)

{

$id=$this->input->post('pk');



 $data=array(

      'Col_Country'=>$this->input->post('country_id'),

    'Col_State'=>$this->input->post('state_id'),

       );

  $this->db->where('pk',$id);

  $this->db->update('User',$data);

     }

?>