Re: DBMS_OUTPUT and PHP
Date: Mon, 02 Jun 2008 00:00:06 +0200
Message-ID: <3n6644pmdd09fefhqrh28655335hg26e33@4ax.com>
On Sun, 1 Jun 2008 09:52:21 -0700 (PDT), Jeanpaulik
<jeanpaulik.boyadjian_at_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 DBAReceived on Sun Jun 01 2008 - 17:00:06 CDT