简体   繁体   English

您必须使用“set”方法来更新条目如何在 php codenniter 中纠正

[英]You must use the "set" method to update an entry how to rectify in php codengniter

You must use the set() method to update an entry.您必须使用set()方法来更新条目。

Filename: F:\\xampp\\htdocs\\task_manager\\system\\database\\DB_active_rec.php文件名:F:\\xampp\\htdocs\\task_manager\\system\\database\\DB_active_rec.php

Line Number: 1273行号:1273

I think you are not updating record correctly我认为您没有正确更新记录

Do like this这样做

Method 1方法一

$this->db->where('column', $value);
$this->db->set($data); // values should be like this $data = array(id=> 1, 'name' => GNN);
return $this->db->update('table');

Method 2方法二

return $this->db->query( "UPDATE tablename SET name = GNN WHERE id = 1" );

For more read doc更多阅读文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM