PHP Oracle Storage
Oracel Stored procedures:
Create or Replace package aa_test is --Author : ADMINISTRATOR --created:2012-5-21 12:30:24 --Purpose : --Public type declarations type mycursor is REF CURSOR; Procedure Getsysdate (in_byzd1 in string, in_byzd2 in string, in_byzd3 in string, Out_flag out string, Out_msg out string, o_cursor out mycursor); end aa_test;/create or replace package body Aa_test is Procedure Getsysdate (in_byzd1 in, in_byzd2 in string, in_byzd3 in string, Out_flag out string, out _msg out string, o_cursor out mycursor) is begin Out_flag: = ' 1 '; Out_msg: = ' executed successfully! '; Open o_cursor for select sysdate,in_byzd1,in_byzd2,in_byzd3 from dual; End;end aa_test;/
PHP code
$sql _sp = "Begin HTS. Aa_test.getsysdate (: in_byzd1,:in_byzd2,:in_byzd3,:out_flag,:out_msg,:o_cursor); end; "; $stmt = Oci_parse ($conn, $sql _sp); Oci_bind_by_name ($stmt, ': In_byzd1 ', $in _byzd1); Oci_bind_by_name ($stmt, ': In_ Byzd2 ', $in _byzd2); Oci_bind_by_name ($stmt, ': In_byzd3 ', $in _byzd3); Oci_bind_by_name ($stmt, ': Out_flag ', $out _flag) ; Oci_bind_by_name ($stmt, ': Out_msg ', $out _msg), Oci_bind_by_name ($stmt, ': O_cursor ', $o _cursor); Oci_execute ($stmt); $result =oci_fetch_assoc ($stmt);p rint_r ($result);
Error occurred
Warning:oci_execute (): ORA-06550: Line 1th, column 7th: PLS-00306: Number of arguments or type error when calling ' Getsysdate ' ORA-06550:1th row, 7th column: Pl/sql:st Atement ignored in C:\xampp\htdocs\ceshi\index.php on line 15
Just contact PHP link Oracle this piece! Ask the great God for a happy advice
Reply to discussion (solution)
Excuse me, have you solved it?
I have the same problem, can you tell me how you solved it? Thank you so much!