CIを初めて使用し、mysqlのデータを更新したいと思います。これが私のコントローラーです
class Ci_update extends CI_Controller
{
function __construct() {
parent::__construct();
}
function index()
{
$data = array
(
'title' => 'Data Structure using C',
'text' => 'Data Structure Using C, for, IIIrd Sem VTU CSE students'
);
$id = 4 ;
$this->load->model('ci_update_model');
$this->ci_update_model($data,$id);
}
}
そして私のモデルは:
class Ci_update_model extends CI_Model
{
function __construct() {
parent::__construct();
}
function updateData($data,$id)
{
$this->db->where('id',$id);
$this->db->update('data',$data);
}
}
しかし、私がプログラムを実行しようとすると、それはCall to undefined method Ci_update::ci_update_model() in C:\wamp\www\ci\application\controllers\ci_update.php on line 19
私が何をしているのかを示しています。