[Oracle + Active Record] Reset queries |
[eluser]Unknown[/eluser]
Hallo, I'm working on CI 1.5.4, *nix server, Oracle db. I'm having a strange bug with Active Record. Let's say I have a model called myNewModel with this 2 methods: Code: function getFirstArray(){ First method gets a long list of stuff (articles i.e.). Second method gets a list of 3 items (category i.e.). When I call from my controller: Code: $myFirstArray = $this->myNewModel->getFirstArray(); to pass data to the view, $myFirstArray is filled up with lots of records, and $mySecondArray has the same contents. It seems like if CI has executed first query again (query executed and freeed in method getFirstArray() ) without resetting queries object, ignoring my second query ( in method getSecondArray() ). I printed $this->db to screen from within the second method, and the object CI_DB_oci8_driver->queries has 2 queries in it. I have $db["cache_on"] set to FALSE, anyway I tried to force cache delete and cache off before preparing select with active record, nothing to do... :-( Somebody had my same problem? I had a look in the forum search but didn't find anything... thanks in advance to everybody Alex
[eluser]Unknown[/eluser]
Try using $this->db->_reset_select() and $this->db->_reset_write(), you can find them in DB_active_rec.php. Hope, it helps
[eluser]mhyk[/eluser]
i am also having the same problem. and i've tried what you've said but still doesn't work.
[eluser]mhyk[/eluser]
this thread http://ellislab.com/forums/viewthread/49156/ helped me solved the problem. |
Welcome Guest, Not a member yet? Register Sign In |