![]() |
Why - You must set the database table to be used with your query. - 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: Why - You must set the database table to be used with your query. (/showthread.php?tid=92279) |
Why - You must set the database table to be used with your query. - 4usol - 01-05-2025 Hi, I wondering about getting this error " You must set the database table to be used with your query." The marked line is this Code: $var=$this->MyModel ->my_function($vars,$id); I do that inside a library. The parts of the model are Code: namespace App\Models; may i'm blind to see the missing thing... RE: Why - You must set the database table to be used with your query. - captain-sensible - 01-05-2025 Code: <?php if you extend CI4 model , you set field in class definition RE: Why - You must set the database table to be used with your query. - 4usol - 01-05-2025 Is it a MUST to define all these "protected ...." settings, i dont wont to work with the built-in CRUD methods, so i guess that i dont need to define it!? I have figure out that the problem comes from another direction, a name of a called function was wrong, if i corret this, the error message (i'm confused about the kind of messag) go away. Now the model works well, without setup the datas on top of the modell. |