Date: 07/04/00
- Next message: Eric Wang: "Re[2]: [phplib] How do u guys excute a PL/SQL block with oci8?"
- Previous message: Eric Wang: "[phplib] How do u guys excute a PL/SQL block with oci8?"
- Maybe in reply to: Eric Wang: "[phplib] How do u guys excute a PL/SQL block with oci8?"
- Next in thread: Eric Wang: "Re[2]: [phplib] How do u guys excute a PL/SQL block with oci8?"
- Reply: Eric Wang: "Re[2]: [phplib] How do u guys excute a PL/SQL block with oci8?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This is an oracle error - not a php or phplib error.
for a pl/sql anonymous block, you need to 1) declare variables before
the begin; 2) in this syntax aaa is not a bind variable (only use the :
for bind variables); and 3) assignments in pl/sql require the := .
instead of:
"begin aaa number=3; insert into emp values (:aaa); commit; end;"
it would be:
"declare aaa number := 3; begin insert into emp(emp_id) values (aaa);
commit; end;"
I highly recommend the Feuerstein book from Oreilly for PL/sql.
http://www.oreilly.com/catalog/oraclep2/
--- Eric Wang <eric <email protected>> wrote:
>
> hi, guys!
> anybody can help me?
> I need excute a Oracle PL/SQL block in php4 with oci8 fuctions,
> but I couldn't make the thing right, and could find the relevant
> manual
> nowhere, any goru give me a short example?
>
> I got the error like this:
> ORA-06550: line 1, column 6: PLS-00103: Encountered the symbol ""
> when expecting one of the following:
> begin declare exit for goto if loop mod null pragma raise return
> select update while << close current delete
> fetch lock insert open rollback savepoint set sql execute commit
> forall
> Query :"begin aaa number=3; insert into emp values (:aaa); commit;
> end;"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
>
__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Eric Wang: "Re[2]: [phplib] How do u guys excute a PL/SQL block with oci8?"
- Previous message: Eric Wang: "[phplib] How do u guys excute a PL/SQL block with oci8?"
- Maybe in reply to: Eric Wang: "[phplib] How do u guys excute a PL/SQL block with oci8?"
- Next in thread: Eric Wang: "Re[2]: [phplib] How do u guys excute a PL/SQL block with oci8?"
- Reply: Eric Wang: "Re[2]: [phplib] How do u guys excute a PL/SQL block with oci8?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

