Undefined property: CodeIgniter\View\View::$db |
Hi, need help to solve this problem:
ErrorException PHP Code: Undefined property: CodeIgniter\View\View::$db PHP Code: $this->db->limit PHP Code: 90 $this->db->limit(9); PHP Code: public function getCategoriesNine($category_id = 0) { Please need help if valir of query parse PHP Code: ->limit(9) present in the view is this proporsal PHP Code: $queryCatNine = (new \App\Models\CommonQueries())->getCategoriesNine(); Update example need know is valid in the view: PHP Code: $queryCat = (new \App\Models\CommonQueries())->getCategoriesNine();
Why don't you pass the query result to your view instead of creating the model in the view?
How about this?
Code: public function getCategoriesNine($category_id = 0) {
This function not its optimal, always get all rows in category tables though the $category_id is set.
I would trade it for this: PHP Code: public function getCategoriesNine($category_id = 0)
What do you want to do?
First of all, I recommend you read https://codeigniter4.github.io/CodeIgnit...ilder.html |
Welcome Guest, Not a member yet? Register Sign In |