Re: Oracle 7 stored procedure execution
| From: | thies at digicol dot de | Date: | Tue, 20 Jun 2000 11:00:14 +0000 |
| Subject: | Re: Oracle 7 stored procedure execution | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-513@lists.php.net to get a copy of this message | ||
On Tue, Jun 20, 2000 at 12:14:41PM +0200, Paolo Brutti wrote:
> Hi all,
> I've tried to adapt for Oracle 7 the same trick Thies suggested for
> returning refcursors from a stored procedure, with no success: I've been able
> to add the proc to the database, but I haven't been able to get it working from
> PHP.
>
> My question is: is it a PHP limitation (i.e. is it possible to extend the
> PHP/Oracle interface to make it work), an Oracle 7 limitation (i.e. is there a
> workaround?) or am I simply too dumb to understand it (i.e., please explain me
> what am I doing wrong ;-))
there is no refcursor support in the ora_ interface! sorry -
you have to use the oci8 api oci*() functions if you want
refcursors.
tc
>
> Here is the php code (the SQL part is the same as Thies suggested)
> <?php
> $conn=ora_logon("username","pwd");
> $query=ora_open($conn);
> ora_parse($query, "BEGIN info.output(:handle);END;");
> $my_handle=ora_open($conn);
> ora_bind($query, "my_handle", ":handle", 32);
> ora_exec($query);
> ora_fetch($my_handle);
> for ($i=0; $i <3; $i++) {
> echo ora_getcolumn($my_handle, $i);
> }
> exit;
> ?>
>
> And this is what I get back
> Warning: Ora_Exec failed (ORA-06550: line 1, column 7: PLS-00306: wrong number or types of
> arguments in call to 'OUTPUT' ORA-06550: line 1, column 7: PL/SQL:
> Statement ignored -- while processing OCI function OEXEC/OEXN) in
> /usr/local/apache/htdocs/paolo/mio.php on line 7
>
> Thanks
> --
> Paolo Brutti | Abbiamo un accordo con Dio:
> Telesoft S.p.a. | Lui non scrive programmi,
> Tel. +39-06-71035675 | noi non facciamo miracoli.
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany