From: <>
Date: Mon, 02 Jun 2008 00:00:06 +0200
Message-ID: <>

On Sun, 1 Jun 2008 09:52:21 -0700 (PDT), Jeanpaulik <> wrote:

>(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>) will have examples.

Sybrand Bakker
Senior Oracle DBA
Received on Sun Jun 01 2008 - 17:00:06 CDT

Original text of this message