Skip to content

Oracle:Known Issues

World Wide Web Server edited this page Jul 4, 2012 · 8 revisions

This page lists known issues with the Oracle Database Driver (and it's solution if possible).

Different queries return the same results

If you run two different queries in the same script you can run into the problem, that both queries return the same result.

Example

$this->load->database(); $query1 = $this->db->query("SELECT * FROM table1"); $result1 = $query1->result(); // Returns Value of table 1 $query1->free_result();

$query2 = $this->db->query("SELECT * FROM table2"); $result2 = $query2->result(); // Also returns Value of table 2

Solution

In file codeigniter/database/driver/oci8/oci8_driver.php you should change the lines
function _set_stmt_id($sql) { if ( ! is_resource($this->stmt_id)) { $this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql)); } }
to
function _set_stmt_id($sql) { $this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql)); }
Clone this wiki locally