Re: collecting a variable value from SQL*Plus
| From: | Patrick ONeill | Date: | Thu, 04 Oct 2001 00:17:20 +0000 |
| Subject: | Re: collecting a variable value from SQL*Plus | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12988@lists.php.net to get a copy of this message | ||
Bona,
You are trying to perform an SQL*PLUS command. I think
you can only perform SQL commands with OCI. You can
print a ref cursor in SQL*PLUS but you have to handle it
differently with OCI. Look at the PHP reference manual for
ocinewcursor.
Good Luck,
Pat
bona@trama.com.br wrote:
> Hi again.
>
> now I´m writing to solve another puzzle of my script...
>
> on the SQL*Plus I type the following code to get x value:
>
> print x;
>
> I trying to do it with PHP this way:
>
> <?
>
> $conn = OCILogon ("SYSTEM","manager");
>
> $cursor = OCIParse ($conn, "print x;end;");
>
> OCIBindByName ($cursor, ":x", $x, 10);
>
> $result = OCIExecute ($cursor);
>
> echo $result;
>
> ?>
>
> and this is my error message:
>
> Warning: OCIBindByName: ORA-01036:not valid name/number in c:\program
> files\apache group\apache\htdocs\apostila\testes\procedure01f.php on line 7
>
> Warning: OCIStmtExecute: ORA-06550: line 1, row 14: PLS-00103: Found "X"
> when one of the followed were espected: := . ( @ % ; O símbolo ":=" in c:
> \program files\apache group\apache\htdocs\apostila\testes\procedure01f.php
> on line 9
>
> any sugestions???
>
> thanks for all the help I having from you!!!
>
> Bona
>
> __________________________
> Visite http://www.trama.com.br