Re: OCI8 error problems

From: Date: Thu, 15 Feb 2001 10:57:44 +0000
Subject: Re: OCI8 error problems
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6655@lists.php.net to get a copy of this message
On Wed, Feb 14, 2001 at 05:40:02PM -0500, Brian Lalor wrote: > Good afternoon, all. Sorry if this has been covered before, but a search > of the archives doesn't turn up any relevant answers. > > I'm having a problem with the OCI8 commands. I'm using PHP 4.0.4pl1 with > Oracle 8.0.5 (yes, I know that's old, but somebody seems to have lost the > CD for 8.1...). Consider the following code where OCIExecute returns > false and PHP spits out the wrning message > Warning: OCIStmtExecute: ORA-00001: unique constraint (CUSTOM.SYS_C007900) violated ORA-06512: > at "CUSTOM.MULT_SHIP_ADDRESS_PKG", line 162 ORA-06512: at line 1 in db.php on line 344 > > $s = OCIParse($conn, $query) > $rc = OCIExecute($s, OCI_COMMIT_ON_SUCCESS); > if(!$rc) { > $err = OCIError($statement); ^^^^^^^^^^? > > if(!$err) { > $err = OCIError($this->conn); ^^^^^^^^^^^? > > if(!$err) { > $err = OCIError(); > > if(!$err) { > print("OCIExecute() returned false, but can't find an error\n"); how should it? you would have to pass in the correct statement|connection handle - elsewise it simply won't work! zc

« previous php.db (#6655) next »