plsql - how to call an Oracle function from PHP that returns more than 1,000,000 buffer (max) -


my oracle not paid. can not use unlimited buffer size. php code below:

<?php $conn = oci_connect('****', '****', '****'); if($conn){     $operation = isset($_post['****']) ? $_post['****'] : null;     $year = isset($_post['****']) ? $_post['****'] : null;     $month = isset($_post['****']) ? $_post['****'] : null;      switch($operation){         case 'summary':             $sql = "begin                     :ret:=rkarim.pkg_sr_functions.report_net(:sal_year_month);                     end;";             $parse = oci_parse($conn, $sql);             oci_bind_by_name($parse, ":ret", $ret, 32767);             oci_bind_by_name($parse, ":sal_year_month", $sal_year_month);             oci_execute($parse);             echo htmlentities($ret);             break;         case 'allowances':                 null;             break;         case 'deductions':                 null;             break;     }      oci_close($conn);     unset($_post['****']);     unset($_post['****']);       unset($_post['****']); } else{     echo 'server down.';     die;     } ?>   

now report_net(sal_year_month number) function oracle returns huge string (more max buffer). first xmltype. problem handle xmltype in php changed in varchar2. huge string how it? if run script oracle function shows me error:

ora-19011: character string buffer small 

well, see have limited return 32767 characters. change clob (as has been suggested). like:

$ret = oci_new_descriptor($conn, oci_d_lob); oci_bind_by_name($parse,':ret', $ret, oci_b_clob); 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -