您必须使用“设置”。更新条目的方法

发布于 2025-02-10 16:50:58 字数 657 浏览 0 评论 0原文

CodeIgniter 2.2.2 没有对网站上的站点代码进行更改,仅通过站点管理面板进行了工作以将信息添加到站点。我不明白为什么会出现此错误,因为在此之前一切正常。这可能是因为安装了新的SSL证书。 错误:您必须使用集合方法来更新记录。文件名:admin_m.php行编号:25 当您尝试通过管理面板在站点上编辑信息时,会发生此错误。

 函数getInfo()
    {
        $ this-> db-> select();
        $ this-> db->来自('tbl_info');
        $ this-> db->其中('id',1);
        $ query = $ this-> db-> get();
        
        返回$ query-> result();
    }
    功能EditInfo($数据)
    {  
    
        $ this-> db->其中('id',1);
        $ this-> db-> update('tbl_info',$ data); //错误是指给定的代码行
        返回true;
    }
 

codeigniter 2.2.2 No changes were made to the site code on the site, only work was carried out through the site admin panel to add information to the site. I do not understand why this error appeared, since before that everything worked correctly. This may have happened because a new ssl certificate was installed. Error: You must use the set method to update a record. File name: admin_m.php Line number: 25 This error occurs when you try to edit information on the site through the admin panel.

function getInfo()
    {
        $this->db->select();
        $this->db->from('tbl_info');
        $this->db->where('id', 1);
        $query = $this->db->get();
        
        return $query->result();
    }
    function editInfo($data)
    {  
    
        $this->db->where('id', 1);
        $this->db->update('tbl_info', $data); // the error refers to the given line of code
        return TRUE;
    }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文