stockton Posted July 8, 2006 Share Posted July 8, 2006 The following php fails with:-Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'SPMEMBERDETAILS' ORA-06550: line 1, column 7: PL/SQL: Statement ignored in C:\Program Files\Apache Group\Apache2\htdocs\KioskCurrent\GM2.php on line 28Cannot Execute statement[code]<?php$number = "2100418933";// Connect to database...$conn=OCILogon("big", "big");if ( ! $conn ) {echo "Unable to connect: " . var_dump( OCIError() );die();}$cursor = OCINewCursor($conn);$stmt = OCIParse($conn, "BEGIN spPackage.spMemberDetails(:number, :cv_memberdetails); END;")or die('Cannot parse query');OCIBindByName($stmt, ":cv_memberdetails", &$cursor)or die('Cannot bind array variable');OCIBindByName($stmt, ":number", &$number)or die('Cannot bind number variable');$exec = OCIExecute($stmt)or die('Cannot Execute statement');OCIExecute($cursor);while ($data = OCIFetchInto($cursor)) {var_dump($data);}OCIFreeStatement($stmt);OCIFreeCursor($cursor);OCILogoff($conn);?>and the stored procedure looks likeSQL> desc sppackage;PROCEDURE SPGETMEMBERNUMBERArgument Name Type In/Out Default?------------------------------ ----------------------- ------ --------P_NUMBER VARCHAR2 INP_MEMBERNUMBER VARCHAR2 OUTPROCEDURE SPGETSLOTSHANDLEArgument Name Type In/Out Default?------------------------------ ----------------------- ------ --------P_HANDLE NUMBER(15,2) OUTP_NUMBER VARCHAR2 INP_STARTDATE VARCHAR2 INP_ENDDATE VARCHAR2 INPROCEDURE SPGETTABLEHANDLEArgument Name Type In/Out Default?------------------------------ ----------------------- ------ --------P_HANDLE NUMBER(15,2) OUTP_NUMBER VARCHAR2 INP_TABLEGAMEPREFIX VARCHAR2 INP_STARTDATE VARCHAR2 INP_ENDDATE VARCHAR2 INPROCEDURE SPMEMBERDETAILSArgument Name Type In/Out Default?------------------------------ ----------------------- ------ --------P_NUMBER VARCHAR2 INCV_MEMBERDETAILS REF CURSOR OUTRECORD OUTR_MEM_NUMBER VARCHAR2(12) OUTR_MEM_SNAME VARCHAR2(25) OUTR_MEM_FNAME VARCHAR2(25) OUTR_MEM_TITLE VARCHAR2(25) OUTPROCEDURE SPTABLESPLAYEDArgument Name Type In/Out Default?------------------------------ ----------------------- ------ --------P_NUMBER VARCHAR2 INP_STARTDATE VARCHAR2 INP_ENDDATE VARCHAR2 INCV_TABLESPLAYED REF CURSOR OUTRECORD OUT:[/code]Please tell me what I have done incorrect. Quote Link to comment https://forums.phpfreaks.com/topic/14015-solved-calling-packaged-stored-procedure-from-php-fails/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.