Part of the EllisLab Network
   
 
OCI Driver Problem
Posted: 22 May 2007 01:31 PM   [ Ignore ]  
Summer Student
Total Posts:  6
Joined  04-26-2007

After discussing this in another forum thread, I believe there is an error in the oci driver (oci8_driver.php). 

In short, it seems that once you run a query on a page, any additional queries that are attempted to run actully re-run the first query called.  It seems that the variable $this->stmt_id is not cleared after query execution.

The simple fix that I found was to change the method _set_stmt_id() from the following:

function _set_($sql)
{
    
if ( ! is_resource($this->stmt_id))
    
{
        $this
->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql));
    
}
}

To something much simpler:

function _set_($sql)
{
    $this
->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql));
}

If 3 users have found this to be troubling behavior and the same 3 users have implemented similar fixes, the I would tend to think this is a bug.

Profile
 
 
Posted: 03 December 2007 11:15 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Avatar
Total Posts:  30
Joined  08-08-2007

Here’s my own path to the same solution…
http://codeigniter.com/forums/viewthread/66294/

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120243 Total Logged-in Users: 58
Total Topics: 126374 Total Anonymous Users: 2
Total Replies: 664626 Total Guests: 451
Total Posts: 791000    
Members ( View Memberlist )