There’s a bug in the oci8 driver that results in the stored statement ID never being changed after the first query is run.
In essence, this means that the first query you run will work just fine, but all subsequent queries on the same page won’t (all the result-related operations will be using the wrong statement ID). There’s a fairly simple fix:
In oci8_driver.php, change:
function _execute($sql)
{
// oracle must parse the query before it is run. All of the actions with
// the query are based on the statement id returned by ociparse
$this->_set_stmt_id($sql);
ocisetprefetch($this->stmt_id, 1000);
return @ociexecute($this->stmt_id, $this->_commit);
}
to:
function _execute($sql)
{
// oracle must parse the query before it is run. All of the actions with
// the query are based on the statement id returned by ociparse
$this->stmt_id = FALSE;
$this->_set_stmt_id($sql);
ocisetprefetch($this->stmt_id, 1000);
return @ociexecute($this->stmt_id, $this->_commit);
}
This will let multiple queries on the same page work properly again.
Active record features for Oracle are still somewhat problematic (I’ve never actually gotten results to go through with their current incarnation), but I may end up debugging it if I have some extra time on my current project.
