Unix Technical Forum

DBMS_OUTPUT and PHP

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 ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-02-2008, 01:34 PM
Jeanpaulik
 
Posts: n/a
Default DBMS_OUTPUT and PHP

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 !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-02-2008, 01:34 PM
sybrandb@hccnet.nl
 
Posts: n/a
Default Re: DBMS_OUTPUT and PHP

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-04-2008, 04:26 PM
Frank van Bortel
 
Posts: n/a
Default Re: DBMS_OUTPUT and PHP

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:09 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com