更新时间:2023-09-16 23:32:04
我使用的代码与您的代码不同,但是可以正常工作,而且很容易理解,首先将此功能放入模型文件中即可.
i have code that is different from yours but it works and also it is easy to understand first put this function in your model file
在模型文件中
function updatedata($tbname, $data, $parm)
{
return $this->db->update($tbname, $data, $parm);
}
在控制器文件中的用法如下
in your controller file use like this
$this->load->model("Your_model_name");
$this->Your_model_name->updatedata('mytable',$data,$your_condition_in_array);
我希望这会有所帮助,我确信此代码可以正常工作,请让我知道此代码适合您.
i hope this will help, i am sure about that this code works, please let me know that this code is worked for you.