Update and There is no data to update. |
I can't figure out where the problem is.
I set the model parameters PHP Code: protected $table = 'myTable'; Now, inside a method PHP Code: $data_update = [ I don't do both updates, both are written to show the two types of approach $row->id has a value and is correct What goes wrong when I don't use set() I've used update() thousands of times, but I don't understand what's going on here Codeigniter version 4.3.4
I have the same problem. Codeigniter version 4.4.3. It should be a bug of some sort. According to the documentation it should work.
I'm happy I saw your post and I used 'set' as a workaround. Just moved the data from 'update' to 'set' and everything works.
You are confusing Model's update() and Query Builder's update().
If you use Model, the update() method needs two parameters (or zero). See https://www.codeigniter.com/user_guide/m...tml#update |
Welcome Guest, Not a member yet? Register Sign In |