Is this a bug or just my bad practice? |
I think that I found a bug or just did some mess while using $this->db->select() method on my code. I'm loading all models by autoload.php, and I gave different names to all of them. But when I started to call them inside the controller, something curious happened: a portion of $this->db->select() that I used in one method of a model was interfering in the behavior of other method in another model.
Considering that the models are all loaded by autoload.php, I called its methods in my controller like this: Code: $arr1 = $this->model1->method1(); Then, an error message was returned: Code: A PHP Error was encountered Here are the samples of the two methods from my models: model1 method: Code: function method1($id){ model2 method: Code: function method2($id){ I've noted that removing $this->db->select('field1'), makes the things work fine. So, it is a bug or just my bad? |
Messages In This Thread |
Is this a bug or just my bad practice? - by BabalooAye - 07-07-2016, 08:38 AM
RE: Is this a bug or just my bad practice? - by InsiteFX - 07-07-2016, 10:34 AM
RE: Is this a bug or just my bad practice? - by BabalooAye - 08-02-2016, 02:20 PM
RE: Is this a bug or just my bad practice? - by Narf - 08-03-2016, 01:11 AM
RE: Is this a bug or just my bad practice? - by mwhitney - 07-07-2016, 01:15 PM
|