dbTalk Databases Forums  

DBMS_OUTPUT and PHP

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss DBMS_OUTPUT and PHP in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jeanpaulik
 
Posts: n/a

Default DBMS_OUTPUT and PHP - 06-01-2008 , 11:52 AM






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 !

Reply With Quote
  #2  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: DBMS_OUTPUT and PHP - 06-01-2008 , 05:00 PM






On Sun, 1 Jun 2008 09:52:21 -0700 (PDT), Jeanpaulik
<jeanpaulik.boyadjian (AT) gmail (DOT) com> wrote:

Quote:
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


Reply With Quote
  #3  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: DBMS_OUTPUT and PHP - 06-01-2008 , 05:00 PM



On Sun, 1 Jun 2008 09:52:21 -0700 (PDT), Jeanpaulik
<jeanpaulik.boyadjian (AT) gmail (DOT) com> wrote:

Quote:
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


Reply With Quote
  #4  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: DBMS_OUTPUT and PHP - 06-01-2008 , 05:00 PM



On Sun, 1 Jun 2008 09:52:21 -0700 (PDT), Jeanpaulik
<jeanpaulik.boyadjian (AT) gmail (DOT) com> wrote:

Quote:
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


Reply With Quote
  #5  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: DBMS_OUTPUT and PHP - 06-01-2008 , 05:00 PM



On Sun, 1 Jun 2008 09:52:21 -0700 (PDT), Jeanpaulik
<jeanpaulik.boyadjian (AT) gmail (DOT) com> wrote:

Quote:
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


Reply With Quote
  #6  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: DBMS_OUTPUT and PHP - 06-04-2008 , 02:46 AM



Jeanpaulik wrote:
Quote:
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


Reply With Quote
  #7  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: DBMS_OUTPUT and PHP - 06-04-2008 , 02:46 AM



Jeanpaulik wrote:
Quote:
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


Reply With Quote
  #8  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: DBMS_OUTPUT and PHP - 06-04-2008 , 02:46 AM



Jeanpaulik wrote:
Quote:
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


Reply With Quote
  #9  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: DBMS_OUTPUT and PHP - 06-04-2008 , 02:46 AM



Jeanpaulik wrote:
Quote:
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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.