I am using Codeigniter on our PHP project that interacts with the Oracle (10g) Database. I have successfully configured Codeigniter to connect and query from the database. However, when I manually run insert/update/delete scripts on the database using Oracle SQL Developer, then check the changes using Codeigniter, it does not recognize the new data.
ie. Say we have a table TBL_PERSON that has ID and NAME columns.
I run an insert statement using Oracle SQL Developer:
insert into TBL_PERSON values(1, 'Name1');
Then I fetch the data in TBL_PERSON through CI:
$this->db->get_where('TBL_PERSON', array('ID'=>1));
It doesn't return the data that has been recently inserted. I have to restart XAMPP, do refreshes on the page a lot of times before the data appears. But if I use CI to insert the data itself, say
$this->db->insert('TBL_PERSON', array('ID'=>1, 'NAME'=>'Name1');
then run the fetch code again, it returns the needed data instantly.
Now, I'm not certain where the inconsistency lies: whether it's in Codeigniter or Oracle SQL Developer. If it is in Codeigniter, what is causing this and what should be the correct set-up to prevent this? Does Codeigniter have result caching for Oracle? I've set the Database Caching of CI to OFF already:
$db['default']['cache_on'] = FALSE;