This is a discussion on DBMS_OUTPUT and PHP within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hello, (I've post this message on php newsgroup too, without success...) When executing PL-SQL code from php, is there ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, (I've post this message on php newsgroup too, without success...) When executing PL-SQL code from php, is there a way to obtain the result of the DBMS_OUTPUT directly into php? Because i've failed. Instead, I use the UTL_FILE package to write a file and copy it by ftp on the web server, that seems to me a little heavy... Thanks ! |
| |||
| On Sun, 1 Jun 2008 09:52:21 -0700 (PDT), Jeanpaulik <jeanpaulik.boyadjian@gmail.com> wrote: >Hello, > >(I've post this message on php newsgroup too, without success...) > >When executing PL-SQL code from php, is there a way to obtain the >result of the DBMS_OUTPUT directly into php? >Because i've failed. >Instead, I use the UTL_FILE package to write a file and copy it by ftp >on the web server, that seems to me a little heavy... > >Thanks ! Why do people always assume version is unimportant? To make sure they won't get any responses? On 9i and higher you could create a PIPELINED PL/SQL function and PIPE ROW the characters you would have sent to dbms_output. Pipelined functions return a resultset/table. On 8i and higher you could store the output in a pl/sql collection (table of varchar2(...) indexed by pls_integer; and output the pl/sql table to a REF CURSOR, using select * from cast(table(<your collection variable>) Http://asktom.oracle.com will have examples. -- Sybrand Bakker Senior Oracle DBA |
| ||||
| Jeanpaulik wrote: > Hello, > > (I've post this message on php newsgroup too, without success...) > > When executing PL-SQL code from php, is there a way to obtain the > result of the DBMS_OUTPUT directly into php? > Because i've failed. > Instead, I use the UTL_FILE package to write a file and copy it by ftp > on the web server, that seems to me a little heavy... > > Thanks ! I think you aske the wrong question: DBMS_OUTPUT will only echo the results back *after* execution. If you want the results as they come in, use DBMS_PIPE -- Regards, Frank van Bortel |
| Thread Tools | |
| Display Modes | |
|
|