Call to undefined method App\Models\[...]::transStart |
My model function is given bellow:
PHP Code: class Product extends Model There is a strange problem. PHP Code: model->saveProduct(true); // This is working fine PHP Code: model->saveProduct(false); // This is not working. Showing error: PHP Code: $this->db->transStart(); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(11-25-2020, 06:22 AM)neoneeco Wrote: 1) Have you tested without this method? (commenting it) Thank you for your response. 1. Without transection, both method are doing as expected. Code: model->saveProduct(true); // Saving product With transection only the update product "model->saveProduct(false);" showing the error. 2. This method is a part of a large class. Everything is doing well except the update method. (11-25-2020, 03:43 PM)InsiteFX Wrote: I am not using Query Builder. Using inherited Codeigniter model instead. Again those method are not working just for PHP Code: model->saveProduct(false); PHP Code: $info['updated'] = time(); Why is this line using the variable $info and not $val (like the rest) ?
I would check the model code, because an update requires that an id field be passed to it.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |