i have a procedure like below;
PREBOOKING.CONTRACT_DATA(:INN, OUTT); --- the OUTT will be an array
when i pass below PL/SQL at SQLPLUS it works fine and displayout
DECLARE OUTT PREBOOKING.tt_contract_data; AAA VARCHAR(20); INN VARCHAR(20):= 1.1; begin PREBOOKING.CONTRACT_DATA(INN, OUTT); FOR I IN OUTT.FIRST .. OUTT.LAST
LOOP AAA := OUTT(I).des; DBMS_OUTPUT.PUT_LINE(AAA); END LOOP; end;
can anyone help me find out how i can do this with php, the php code i have now is;
<?php
$c1=OCILogon("user", "pass", "db");
if ( ! $c1 ) {
echo "Unable to connect: " . var_dump( OCIError() );
die();
}
$IN = 1.1;
$OUT=array();
$stmt = OCIParse($c1, "DECLARE OUTT PREBOOKING.tt_contract_data; AAA VARCHAR(20); INN VARCHAR(20):= 1.1; begin PREBOOKING.CONTRACT_DATA(:INN, OUTT); FOR I IN OUTT.FIRST .. OUTT.LAST
LOOP :AAA := OUTT(I).des; DBMS_OUTPUT.PUT_LINE(AAA); END LOOP; end;");
OCIBindByName($stmt, ':INN', $IN, 32);
OCIBindByName($stmt, ':AAA', $OUT->, 300000);
OCIExecute($stmt, OCI_DEFAULT);
OCICommit($c1);
OCILogoff($c1);
?>
can anyone help urgently