我通過OCI8連接到Oracle。從Oracle存儲過程返回OCI8表
我有一個存儲過程:
PROCEDURE ocigetaccounts(accounts OUT SYS_REFCURSOR)
IS BEGIN
OPEN accounts FOR
SELECT * FROM tbaccounts;
END ocigetaccounts;
而且我嘗試使用OCI將其返回到PHP:
$sqlString = 'BEGIN accounts.ocigetaccounts(:accounts); END;';
oci_bind_by_name($statement, ':accounts', $result, -1);
echo $result;
(要求PHP端OCI到位的其餘部分。 )
我得到的錯誤是:
警告:oci_execute():ORA-06550:1號線,共lumn 7:PLS-00306:錯號碼或類型的呼叫參數「OCIGETACCOUNTS」
我怎樣才能獲得$結果到容器上的表資源