Transaction in controller throwing error |
Hi all,
I want to use transaction in the controller but I am getting below error: Undefined property: App\Controllers\Product_Control::$db (Product_Control is my controller) My code is as below Code: $this->db->transBegin(); Am I doing anything wrong here.?... Please help me.
You need to connect to the database:
https://codeigniter.com/user_guide/datab...cting.html Code: $this->db = \Config\Database::connect(); |
Welcome Guest, Not a member yet? Register Sign In |