Welcome Guest, Not a member yet? Register   Sign In
Oracle INSERTs failing, but no errors
#9

[eluser]jabbett[/eluser]
I think I've found the culprit. If my analysis is correct, the _set_stmt_id() function in oci8_driver.php will only ever run once.

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

When the first query comes through, stmt_id is null, and the body of the if statement gets run, which prepares the SQL for execution. The second time a query comes through, since stmt_id is now a valid resource, the query won't get parsed and then won't be executed.

If I take out the "if" line (and its related curly braces), and let every query get parsed, everything seems to work fine.

(Of course, I'm new to this Oracle stuff, and the fact that I'm responsible for debugging a PHP Oracle adapter is unsettling, to say the least.)


Messages In This Thread
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 07:44 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 07:52 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 08:33 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 08:35 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 08:37 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 08:59 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 09:13 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 09:37 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 10:04 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 10:14 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 10:34 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 10:51 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 11:12 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 11:32 PM
Oracle INSERTs failing, but no errors - by El Forum - 12-03-2007, 11:34 PM
Oracle INSERTs failing, but no errors - by El Forum - 04-21-2011, 01:54 PM
Oracle INSERTs failing, but no errors - by El Forum - 10-05-2014, 10:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB