![]() |
You must use the "set" method to update an entry - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: You must use the "set" method to update an entry (/showthread.php?tid=77652) |
You must use the "set" method to update an entry - Aoryu - 09-30-2020 Hi there! I'm evolving from CI3 to CI4 but recently i had a problem that couldn't be resolved Googling or Searching into this forums so, i decided to create this topic: The Question: I'm trying to update a record's password but i couldn't do it with those three methods: Code: $DATA = [ Code: $DATA = [ Code: $DATA = [ Code: $usuario->set('u_secret', password_hash($this->request->getPost('newpass'), PASSWORD_DEFAULT)); In all these tests, the resultant 500 Error is this: Quote:Uncaught Error: { "title": "CodeIgniter\\Database\\Exceptions\\DatabaseException", "type": "CodeIgniter\\Database\\Exceptions\\DatabaseException", "code": 500, "message": "You must use the \"set\" method to update an entry.", "file": "/var/www/html/economato/vendor/codeigniter4/framework/system/Database/BaseBuilder.php", "line": 2517, "trace": [ { "file": "/var/www/html/economato/vendor/codeigniter4/framework/system/Database/BaseBuilder.php", "line": 2430, "function": "validateUpdate", "class": "CodeIgniter\\Database\\BaseBuilder", "type": "->", "args": [] }, { "file": "/var/www/html/economato/vendor/codeigniter4/framework/system/Model.php", "line": 889, "function": "update", "class": "CodeIgniter\\Database\\BaseBuilder", "type": "->", "args": [] }, { "file": "/var/www/html/economato/app/Controllers/Usuario.php", "line": 51, "function": "update", "class": "CodeIgniter\\Model", "type": "->", "args": [] }, { "file": "/var/www/html/economato/vendor/codeigniter4/framework/system/CodeIgniter.php", "line": 918, "function": "commitpwdchange", "class": "App\\Controllers\\Usuario", "type": "->", "args": [] }, { "file": "/var/www/html/economato/vendor/codeigniter4/framework/system/CodeIgniter.php", "line": 404, "function": "runController", "class": "CodeIgniter\\CodeIgniter", "type": "->", "args": [ { "session": {} } ] }, { "file": "/var/www/html/economato/vendor/codeigniter4/framework/system/CodeIgniter.php", "line": 312, "function": "handleRequest", "class": "CodeIgniter\\CodeIgniter", "type": "->", "args": [ null, { "handler": "file", "backupHandler": "dummy", "storePath": "/var/www/html/economato/writable/cache/", "cacheQueryString": false, "prefix": "", "memcached": { "host": "127.0.0.1", "port": 11211, "weight": 1, "raw": false }, "redis": { "host": "127.0.0.1", "password": null, "port": 6379, "timeout": 0, "database": 0 }, "validHandlers": { "dummy": "CodeIgniter\\Cache\\Handlers\\DummyHandler", "file": "CodeIgniter\\Cache\\Handlers\\FileHandler", "memcached": "CodeIgniter\\Cache\\Handlers\\MemcachedHandler", "predis": "CodeIgniter\\Cache\\Handlers\\PredisHandler", "redis": "CodeIgniter\\Cache\\Handlers\\RedisHandler", "wincache": "CodeIgniter\\Cache\\Handlers\\WincacheHandler" } }, false ] }, { "file": "/var/www/html/economato/index.php", "line": 45, "function": "run", "class": "CodeIgniter\\CodeIgniter", "type": "->", "args": [] } ] } I know it cames with data but isn't so relevant for privacy. But i can't update the record trying 4 methods. ¿Is something wrong with the settings? Please let me know. Thanks for eventual response. ![]() |