php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22087 OCIBindByName causes problem if more than one Oracle statements are executed.
Submitted: 2003-02-06 02:24 UTC Modified: 2003-02-06 02:37 UTC
From: gnitesh at yahoo dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5CVS-2003-02-06 (dev) OS: Red Hat Linux 7.3
Private report: No CVE-ID: None
 [2003-02-06 02:24 UTC] gnitesh at yahoo dot com
I have a script that combines various statements before it calls the OCIParse or OCIExecute.

For instance

Begin 
Insert into TABLEA(COLA, COLB, COLC) Values('VAL1', 'VAL2', 'VAL3'); Update TABLEB Set COLB = 'SOMEVAL' Where ROWID = :RID1 
End;

when I call an OCIBindByName for :RID1 as

OCIBindByName($oci_stmt,":RID".$i,&$this->arr_rowid[$i],-1,OCI_B_ROWID);

where I've defined each subscript of arr_rowid using OCINewDescriptor using the following

						$this->arr_rowid[$i] = OCINewDescriptor($this->obj_conn,OCI_D_ROWID);

OCIExecute gives me an error saying 

Warning: OCIStmtExecute: ORA-06550: line 1, column 221: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 1, column 93: PL/SQL: SQL Statement ignored ORA-06550: line 1, column 224: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with /var/www/html/crp/includes/dbconn.inc on line 333

I'm still investigating into the issue. Instincts tell me that the problem is due to multiple statements in 1 query so am all up on changing the entire class for all such occurances. However, the attempt to save database time by executing multiple queries together seems like is not destined to work. If it doesn't work, I'll get back in here with more info.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-06 02:37 UTC] magnus@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 21:01:30 2024 UTC