Tutorialsplane

Codeigniter Load Model | Unable to load Model

Codeigniter Load Model | Unable to load Model

Suppose The model name is User_model

///model class in Model folder


class User_model extends CI_Model {
  public function Update_users(){
    //some query to update 
  }
}

suppose we want to load and call method Update_users() from controller

First of all load model as :


$this->load->model("User_model");

now if you want to call the Update_users() method :


$thi->User_model->Update_users();